aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/commit.c
diff options
context:
space:
mode:
authorJeff Hostetler <jeffhostetler@github.com>2024-02-26 21:39:25 +0000
committerJunio C Hamano <gitster@pobox.com>2024-03-06 09:10:06 -0800
commit29c139ce7895e1c14be119300a7f99fbdc90c5e1 (patch)
treeda34e706fcac4cde4a0ad8e6b102781433457ffc /builtin/commit.c
parentfsmonitor: refactor bit invalidation in refresh callback (diff)
downloadgit-29c139ce7895e1c14be119300a7f99fbdc90c5e1.tar.gz
git-29c139ce7895e1c14be119300a7f99fbdc90c5e1.zip
fsmonitor: support case-insensitive events
Teach fsmonitor_refresh_callback() to handle case-insensitive lookups if case-sensitive lookups fail on case-insensitive systems. This can cause 'git status' to report stale status for files if there are case issues/errors in the worktree. The FSMonitor daemon sends FSEvents using the observed spelling of each pathname. On case-insensitive file systems this may be different than the expected case spelling. The existing code uses index_name_pos() to find the cache-entry for the pathname in the FSEvent and clear the CE_FSMONITOR_VALID bit so that the worktree scan/index refresh will revisit and revalidate the path. On a case-insensitive file system, the exact match lookup may fail to find the associated cache-entry. This causes status to think that the cached CE flags are correct and skip over the file. Update event handling to optionally use the name-hash and dir-name-hash if necessary. Also update t7527 to convert the "test_expect_failure" to "_success" now that we have fixed the bug. 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