Git fork

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

+8 -1
+1 -1
submodule.c
··· 82 82 if ((pos >= 0) && (pos < istate->cache_nr)) { 83 83 struct stat st; 84 84 if (lstat(GITMODULES_FILE, &st) == 0 && 85 - ie_match_stat(istate, istate->cache[pos], &st, 0) & DATA_CHANGED) 85 + ie_modified(istate, istate->cache[pos], &st, 0) & DATA_CHANGED) 86 86 return 0; 87 87 } 88 88
+7
t/t3600-rm.sh
··· 425 425 git status -s -uno >actual && 426 426 test_cmp expect actual 427 427 ' 428 + test_expect_success 'rm will not error out on .gitmodules file with zero stat data' ' 429 + git reset --hard && 430 + git submodule update && 431 + git read-tree HEAD && 432 + git rm submod && 433 + test_path_is_missing submod 434 + ' 428 435 429 436 test_expect_success 'rm issues a warning when section is not found in .gitmodules' ' 430 437 git reset --hard &&