]> git.ipfire.org Git - thirdparty/git.git/commit - fsmonitor.c
fsmonitor: move untracked-cache invalidation into helper functions
authorJeff Hostetler <jeffhostetler@github.com>
Mon, 26 Feb 2024 21:39:19 +0000 (21:39 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 26 Feb 2024 23:34:02 +0000 (15:34 -0800)
commit7c97174dcd6d0f5327cc9b9ddf171ba1d9bba91c
tree228880551257139f35e11a761574584e754d2858
parent48f4cd7155a117b964e446f5c954d1046f2038c0
fsmonitor: move untracked-cache invalidation into helper functions

Move the call to invalidate the untracked-cache for the FSEvent
pathname into the two helper functions.

In a later commit in this series, we will call these helpers
from other contexts and it safer to include the UC invalidation
in the helpers than to remember to also add it to each helper
call-site.

This has the side-effect of invalidating the UC *before* we
invalidate the ce_flags in the cache-entry.  These activities
are independent and do not affect each other.  Also, by doing
the UC work first, we can avoid worrying about "early returns"
or the need for the usual "goto the end" in each of the
handler functions.

Signed-off-by: Jeff Hostetler <jeffhostetler@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
fsmonitor.c