diff options
Diffstat (limited to 'read-cache.c')
-rw-r--r-- | read-cache.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/read-cache.c b/read-cache.c index 76513cdc8f..79e3bbe024 100644 --- a/read-cache.c +++ b/read-cache.c @@ -1796,6 +1796,8 @@ int write_index(struct index_state *istate, int newfd) continue; if (!ce_uptodate(ce) && is_racy_timestamp(istate, ce)) ce_smudge_racily_clean_entry(ce); + if (is_null_sha1(ce->sha1)) + return error("cache entry has null sha1: %s", ce->name); if (ce_write_entry(&c, newfd, ce, previous_name) < 0) return -1; } |