MCPcopy Index your code
hub / github.com/git/git / track_linear

Function track_linear

revision.c:4333–4352  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4331}
4332
4333static void track_linear(struct rev_info *revs, struct commit *commit)
4334{
4335 if (revs->track_first_time) {
4336 revs->linear = 1;
4337 revs->track_first_time = 0;
4338 } else {
4339 struct commit_list *p;
4340 for (p = revs->previous_parents; p; p = p->next)
4341 if (p->item == NULL || /* first commit */
4342 oideq(&p->item->object.oid, &commit->object.oid))
4343 break;
4344 revs->linear = p != NULL;
4345 }
4346 if (revs->reverse) {
4347 if (revs->linear)
4348 commit->object.flags |= TRACK_LINEAR;
4349 }
4350 commit_list_free(revs->previous_parents);
4351 revs->previous_parents = commit_list_copy(commit->parents);
4352}
4353
4354enum rev_walk_mode {
4355 REV_WALK_REFLOG,

Callers 1

get_revision_1Function · 0.85

Calls 3

oideqFunction · 0.85
commit_list_freeFunction · 0.85
commit_list_copyFunction · 0.85

Tested by

no test coverage detected