From: Junio C Hamano Date: Sun, 23 Oct 2005 10:02:18 +0000 (-0700) Subject: upload-pack: fix thinko in common-commit finder code. X-Git-Tag: v0.99.9~49 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=7efc8e43508b415e2540dbcb79521bde16c51e0c;p=git.git upload-pack: fix thinko in common-commit finder code. The code to check if we have the object the other side has was bogus (my fault). Signed-off-by: Junio C Hamano --- diff --git a/upload-pack.c b/upload-pack.c index c3abf7ba6..25a343ecc 100644 --- a/upload-pack.c +++ b/upload-pack.c @@ -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;