fetch-pack: do not stop traversing an already parsed commit
f3ec549
(fetch-pack: check parse_commit/object results, 2008-03-03)
broke common ancestor computation by stopping traversal when it sees
an already parsed commit. This should fix it.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
e42251a221
commit
72269ad956
@ -117,15 +117,15 @@ static const unsigned char* get_rev(void)
|
|||||||
|
|
||||||
while (commit == NULL) {
|
while (commit == NULL) {
|
||||||
unsigned int mark;
|
unsigned int mark;
|
||||||
struct commit_list *parents = NULL;
|
struct commit_list *parents;
|
||||||
|
|
||||||
if (rev_list == NULL || non_common_revs == 0)
|
if (rev_list == NULL || non_common_revs == 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
commit = rev_list->item;
|
commit = rev_list->item;
|
||||||
if (!(commit->object.parsed))
|
if (commit->object.parsed)
|
||||||
if (!parse_commit(commit))
|
parse_commit(commit);
|
||||||
parents = commit->parents;
|
parents = commit->parents;
|
||||||
|
|
||||||
commit->object.flags |= POPPED;
|
commit->object.flags |= POPPED;
|
||||||
if (!(commit->object.flags & COMMON))
|
if (!(commit->object.flags & COMMON))
|
||||||
|
Reference in New Issue
Block a user