Skip to content

Commit

Permalink
git-mv: allow submodules and fsmonitor to work together
Browse files Browse the repository at this point in the history
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 <[email protected]>
Helped-by: Stefan Beller <[email protected]>
Signed-off-by: Ben Peart <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
  • Loading branch information
benpeart authored and gitster committed Sep 12, 2018
1 parent 53f9a3e commit 43f1180
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions submodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ int is_staging_gitmodules_ok(struct index_state *istate)
if ((pos >= 0) && (pos < istate->cache_nr)) {
struct stat st;
if (lstat(GITMODULES_FILE, &st) == 0 &&
ie_match_stat(istate, istate->cache[pos], &st,
CE_MATCH_IGNORE_FSMONITOR) & DATA_CHANGED)
ie_match_stat(istate, istate->cache[pos], &st, 0) & DATA_CHANGED)
return 0;
}

Expand Down

0 comments on commit 43f1180

Please sign in to comment.