upload-pack: make sure "want" objects are parsed
[gitweb.git] / upload-pack.c
index e29d5d2085657a201f1d0028144e4cddaf64c611..b6ec605b0931314deddbbb4aa7ea553f495fc1cf 100644 (file)
@@ -639,7 +639,7 @@ static void receive_needs(void)
                        use_include_tag = 1;
 
                o = lookup_object(sha1_buf);
-               if (!o)
+               if (!o || !parse_object(o->sha1))
                        die("git upload-pack: not our ref %s",
                            sha1_to_hex(sha1_buf));
                if (!(o->flags & WANTED)) {