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:
Diffstat (limited to 'entry.c')
-rw-r--r--entry.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/entry.c b/entry.c
index f879758c73..ab79f1f69c 100644
--- a/entry.c
+++ b/entry.c
@@ -341,7 +341,9 @@ finish:
if (state->refresh_cache) {
assert(state->istate);
if (!fstat_done)
- lstat(ce->name, &st);
+ if (lstat(ce->name, &st) < 0)
+ return error_errno("unable to stat just-written file %s",
+ ce->name);
fill_stat_cache_info(ce, &st);
ce->ce_flags |= CE_UPDATE_IN_BASE;
state->istate->cache_changed |= CE_ENTRY_CHANGED;