Merge branch 'mt/entry-fstat-fallback-fix' into master
"git checkout" failed to catch an error from fstat() after updating a path in the working tree. * mt/entry-fstat-fallback-fix: entry: check for fstat() errors after checkout
This commit is contained in:
commit
d341042f71
3
entry.c
3
entry.c
@ -113,8 +113,7 @@ static int fstat_output(int fd, const struct checkout *state, struct stat *st)
|
|||||||
/* use fstat() only when path == ce->name */
|
/* use fstat() only when path == ce->name */
|
||||||
if (fstat_is_reliable() &&
|
if (fstat_is_reliable() &&
|
||||||
state->refresh_cache && !state->base_dir_len) {
|
state->refresh_cache && !state->base_dir_len) {
|
||||||
fstat(fd, st);
|
return !fstat(fd, st);
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user