mirror of
https://github.com/git/git
synced 2024-08-24 18:26:02 +00:00
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:
parent
40a1046249
commit
7efc8e4350
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue