Skip to content

Commit

Permalink
upload-pack: fix thinko in common-commit finder code.
Browse files Browse the repository at this point in the history
The code to check if we have the object the other side has was bogus
(my fault).

Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Junio C Hamano committed Oct 24, 2005
1 parent 40a1046 commit 7efc8e4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion upload-pack.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ static int got_sha1(char *hex, unsigned char *sha1)
return 0;
if (nr_has < MAX_HAS) {
struct object *o = lookup_object(sha1);
if (!o || (!o->parsed && !parse_object(sha1)))
if (!(o && o->parsed))
o = parse_object(sha1);
if (!o)
die("oops (%s)", sha1_to_hex(sha1));
if (o->type == commit_type) {
struct commit_list *parents;
Expand Down

0 comments on commit 7efc8e4

Please sign in to comment.