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>
This commit is contained in:
Junio C Hamano 2005-10-23 03:02:18 -07:00
parent 40a1046249
commit 7efc8e4350

View file

@ -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;