summaryrefslogtreecommitdiff
path: root/read-cache.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2018-05-14 11:00:56 -0400
committerJeff King <peff@peff.net>2018-05-21 23:50:11 -0400
commiteb12dd0c764d2b71bebd5ffffb7379a3835253ae (patch)
treef3bf6c5ab43cc098fd2e026b336a300dc07f7a93 /read-cache.c
parent641084b618ddbe099f0992161988c3e479ae848b (diff)
downloadgit-eb12dd0c764d2b71bebd5ffffb7379a3835253ae.tar.gz
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 'read-cache.c')
0 files changed, 0 insertions, 0 deletions