Merge branch 'jk/maint-null-in-trees'
We do not want a link to 0{40} object stored anywhere in our objects. * jk/maint-null-in-trees: fsck: detect null sha1 in tree entries do not write null sha1s to on-disk index diff: do not use null sha1 as a sentinel value
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user