summaryrefslogtreecommitdiff
path: root/upload-pack.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-10-23 10:02:18 (GMT)
committerJunio C Hamano <junkio@cox.net>2005-10-24 22:13:38 (GMT)
commit7efc8e43508b415e2540dbcb79521bde16c51e0c (patch)
tree6234aa4f7095054a137e030030f914dc6633f809 /upload-pack.c
parent40a10462498bdd23d4e49f02867b8be50eb78704 (diff)
downloadgit-7efc8e43508b415e2540dbcb79521bde16c51e0c.zip
git-7efc8e43508b415e2540dbcb79521bde16c51e0c.tar.gz
git-7efc8e43508b415e2540dbcb79521bde16c51e0c.tar.bz2
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>
Diffstat (limited to 'upload-pack.c')
-rw-r--r--upload-pack.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/upload-pack.c b/upload-pack.c
index c3abf7b..25a343e 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;