diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-28 16:27:49 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-04-28 16:27:49 -0700 |
commit | 72269ad9564b700e6aab30338e35b4e6ffea854d (patch) | |
tree | 5b4277ada63369870bceef2e259d7e3b65b6b899 /builtin-fetch-pack.c | |
parent | e42251a221e44c0bd8438019da1c307def9a4ca8 (diff) | |
download | git-72269ad9564b700e6aab30338e35b4e6ffea854d.tar.gz |
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>
Diffstat (limited to 'builtin-fetch-pack.c')
-rw-r--r-- | builtin-fetch-pack.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/builtin-fetch-pack.c b/builtin-fetch-pack.c index 65350ca522..fe8cfa0cb8 100644 --- a/builtin-fetch-pack.c +++ b/builtin-fetch-pack.c @@ -117,15 +117,15 @@ static const unsigned char* get_rev(void) while (commit == NULL) { unsigned int mark; - struct commit_list *parents = NULL; + struct commit_list *parents; if (rev_list == NULL || non_common_revs == 0) return NULL; commit = rev_list->item; - if (!(commit->object.parsed)) - if (!parse_commit(commit)) - parents = commit->parents; + if (commit->object.parsed) + parse_commit(commit); + parents = commit->parents; commit->object.flags |= POPPED; if (!(commit->object.flags & COMMON)) |