diff options
author | Jeff King <peff@peff.net> | 2018-05-14 18:00:56 +0300 |
---|---|---|
committer | Jeff King <peff@peff.net> | 2018-05-22 06:50:11 +0300 |
commit | eb12dd0c764d2b71bebd5ffffb7379a3835253ae (patch) | |
tree | f3bf6c5ab43cc098fd2e026b336a300dc07f7a93 /help.h | |
parent | 641084b618ddbe099f0992161988c3e479ae848b (diff) |
update-index: stat updated files earlier
In the update_one(), we check verify_path() on the proposed
path before doing anything else. In preparation for having
verify_path() look at the file mode, let's stat the file
earlier, so we can check the mode accurately.
This is made a bit trickier by the fact that this function
only does an lstat in a few code paths (the ones that flow
down through process_path()). So we can speculatively do the
lstat() here and pass the results down, and just use a dummy
mode for cases where we won't actually be updating the index
from the filesystem.
Signed-off-by: Jeff King <peff@peff.net>
Diffstat (limited to 'help.h')
0 files changed, 0 insertions, 0 deletions