summaryrefslogtreecommitdiff
path: root/builtin/commit.c
diff options
context:
space:
mode:
authorJeff Hostetler <jeffhostetler@github.com>2024-02-26 21:39:21 +0000
committerJunio C Hamano <gitster@pobox.com>2024-02-26 15:34:03 -0800
commit558d146d13e2632aa9cd580cbfb81fbf635c3566 (patch)
tree3a05531fdb1c8cc7518215b70fa055cd007ab242 /builtin/commit.c
parenta52482036cde8d2cd779039a70162fda9bd1c29a (diff)
fsmonitor: remove custom loop from non-directory path handler
Refactor the code that handles refresh events for pathnames that do not contain a trailing slash. Instead of using a custom loop to try to scan the index and detect if the FSEvent named a file or might be a directory prefix, use the recently created helper function to do that. Also update the comments to describe what and why we are doing this. On platforms that DO NOT annotate FS events with a trailing slash, if we fail to find an exact match for the pathname in the index, we do not know if the pathname represents a directory or simply an untracked file. Pretend that the pathname is a directory and try again before assuming it is an untracked file. Signed-off-by: Jeff Hostetler <jeffhostetler@github.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit.c')
0 files changed, 0 insertions, 0 deletions