Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-09-11 02:24:53 +0400
committerJunio C Hamano <gitster@pobox.com>2012-09-11 02:24:54 +0400
commit03adeeaad6c039aadda074de9509f4d845739d55 (patch)
tree826dba3c67172a391714d5d804dff638844e8025 /read-cache.c
parent423a9e28fc144624437cb00ce853b741891ae623 (diff)
parentc479d14a80743b1cb86d77695607f4c81f7d8797 (diff)
Merge branch 'jk/maint-null-in-trees' into maint-1.7.11
"git diff" had a confusion between taking data from a path in the working tree and taking data from an object that happens to have name 0{40} recorded in a tree. * 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
Diffstat (limited to 'read-cache.c')
-rw-r--r--read-cache.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/read-cache.c b/read-cache.c
index b645827c06..7d4bf68e33 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -1790,6 +1790,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;
}