diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-02-12 23:41:35 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-02-12 23:41:36 +0300 |
commit | a74c387495d1640537c5e163b053932ab1992156 (patch) | |
tree | befce01b840061b2b2f615caefeac601aef6d66e /submodule.c | |
parent | 3f7553acf50aaa2841899d34b19ff93eee64361f (diff) | |
parent | 7edee32985b1363e35e91c7358a9e60f2359fbba (diff) |
Merge branch 'dt/submodule-rm-with-stale-cache'
Running "git rm" on a submodule failed unnecessarily when
.gitmodules is only cache-dirty, which has been corrected.
* dt/submodule-rm-with-stale-cache:
git rm submodule: succeed if .gitmodules index stat info is zero
Diffstat (limited to 'submodule.c')
-rw-r--r-- | submodule.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/submodule.c b/submodule.c index 3a184b66ab..5e8e3d1480 100644 --- a/submodule.c +++ b/submodule.c @@ -82,7 +82,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, 0) & DATA_CHANGED) + ie_modified(istate, istate->cache[pos], &st, 0) & DATA_CHANGED) return 0; } |