Skip to content

Commit d341042

Browse files
committed
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
2 parents 3ed0f1e + 35e6e21 commit d341042

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

entry.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,7 @@ static int fstat_output(int fd, const struct checkout *state, struct stat *st)
113113
/* use fstat() only when path == ce->name */
114114
if (fstat_is_reliable() &&
115115
state->refresh_cache && !state->base_dir_len) {
116-
fstat(fd, st);
117-
return 1;
116+
return !fstat(fd, st);
118117
}
119118
return 0;
120119
}

0 commit comments

Comments
 (0)