diff options
Diffstat (limited to 'cache-tree.c')
-rw-r--r-- | cache-tree.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cache-tree.c b/cache-tree.c index 345ea35963..34baa6d85a 100644 --- a/cache-tree.c +++ b/cache-tree.c @@ -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; |