git-mv: allow submodules and fsmonitor to work together
It was reported that GIT_FSMONITOR_TEST=$PWD/t7519/fsmonitor-all ./t7411-submodule-config.sh breaks as the fsmonitor data is out of sync with the state of the .gitmodules file. Update is_staging_gitmodules_ok() so that it no longer tells ie_match_stat() to ignore refreshing the fsmonitor data. Reported-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Helped-by: Stefan Beller <sbeller@google.com> Signed-off-by: Ben Peart <benpeart@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Ben Peart committed
Sep 10, 2018 at 16:29 UTC
43f1180814f456ba5fb90a55c90766b5799bd1a7
1 file changed
+1
-2
submodule.c
+1
-2
@@ -65,8 +65,7 @@ int is_staging_gitmodules_ok(struct index_state *istate)
65
if ((pos >= 0) && (pos < istate->cache_nr)) {
66
struct stat st;
67
if (lstat(GITMODULES_FILE, &st) == 0 &&
68
- ie_match_stat(istate, istate->cache[pos], &st,
69
- CE_MATCH_IGNORE_FSMONITOR) & DATA_CHANGED)
68
+ ie_match_stat(istate, istate->cache[pos], &st, 0) & DATA_CHANGED)
69
return 0;
70
}
71