Merge branch 'ls/travis-doc-asciidoctor'
[gitweb.git] / cache-tree.c
index 345ea359638fbdfec874c55d387f9da2399338d2..34baa6d85a1e156a5d01c0e5f9c5f5d2709049ab 100644 (file)
@@ -354,7 +354,9 @@ static int update_one(struct cache_tree *it,
                        entlen = pathlen - baselen;
                        i++;
                }
-               if (mode != S_IFGITLINK && !missing_ok && !has_sha1_file(sha1)) {
+
+               if (is_null_sha1(sha1) ||
+                   (mode != S_IFGITLINK && !missing_ok && !has_sha1_file(sha1))) {
                        strbuf_release(&buffer);
                        if (expected_missing)
                                return -1;