1
0
mirror of https://github.com/git/git synced 2024-07-07 19:39:27 +00:00

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:
Junio C Hamano 2020-07-09 14:00:45 -07:00
commit d341042f71

View File

@ -113,8 +113,7 @@ static int fstat_output(int fd, const struct checkout *state, struct stat *st)
/* use fstat() only when path == ce->name */
if (fstat_is_reliable() &&
state->refresh_cache && !state->base_dir_len) {
fstat(fd, st);
return 1;
return !fstat(fd, st);
}
return 0;
}