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 <junkio@cox.net>
Junio C Hamano committed
Oct 23, 2005 at 03:02 UTC
7efc8e43508b415e2540dbcb79521bde16c51e0c
1 file changed
+3
-1
upload-pack.c
+3
-1
@@ -93,7 +93,9 @@ static int got_sha1(char *hex, unsigned char *sha1)
93
return 0;
94
if (nr_has < MAX_HAS) {
95
struct object *o = lookup_object(sha1);
96
- if (!o || (!o->parsed && !parse_object(sha1)))
96
+ if (!(o && o->parsed))
97
+ o = parse_object(sha1);
98
+ if (!o)
99
die("oops (%s)", sha1_to_hex(sha1));
100
if (o->type == commit_type) {
101
struct commit_list *parents;