]> asedeno.scripts.mit.edu Git - git.git/blobdiff - builtin-pack-objects.c
git grep: Add "-z/--null" option as in GNU's grep.
[git.git] / builtin-pack-objects.c
index 4004e73e40db210334fa3ef69b49d07b929f2c99..1158e42cba81e2bdb8640cd6c5a3835453d17e7f 100644 (file)
@@ -1725,6 +1725,14 @@ static void prepare_pack(int window, int depth)
                        if (entry->type < 0)
                                die("unable to get type of object %s",
                                    sha1_to_hex(entry->idx.sha1));
+               } else {
+                       if (entry->type < 0) {
+                               /*
+                                * This object is not found, but we
+                                * don't have to include it anyway.
+                                */
+                               continue;
+                       }
                }
 
                delta_list[n++] = entry;