summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cache-tree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cache-tree.c b/cache-tree.c
index f6d1dd1d7f..b34b0bc317 100644
--- a/cache-tree.c
+++ b/cache-tree.c
@@ -177,7 +177,7 @@ static int update_one(struct cache_tree *it,
char *buffer;
int i;
- if (0 <= it->entry_count)
+ if (0 <= it->entry_count && has_sha1_file(it->sha1))
return it->entry_count;
/*