summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2020-02-12 12:41:35 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-02-12 12:41:36 -0800
commita74c387495d1640537c5e163b053932ab1992156 (patch)
treebefce01b840061b2b2f615caefeac601aef6d66e /t
parentMerge branch 'jt/t5616-robustify' (diff)
parentgit rm submodule: succeed if .gitmodules index stat info is zero (diff)
downloadtgif-a74c387495d1640537c5e163b053932ab1992156.tar.xz
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 't')
-rwxr-xr-xt/t3600-rm.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/t/t3600-rm.sh b/t/t3600-rm.sh
index 0ea858d652..f2c0168941 100755
--- a/t/t3600-rm.sh
+++ b/t/t3600-rm.sh
@@ -425,6 +425,13 @@ test_expect_success 'rm will error out on a modified .gitmodules file unless sta
git status -s -uno >actual &&
test_cmp expect actual
'
+test_expect_success 'rm will not error out on .gitmodules file with zero stat data' '
+ git reset --hard &&
+ git submodule update &&
+ git read-tree HEAD &&
+ git rm submod &&
+ test_path_is_missing submod
+'
test_expect_success 'rm issues a warning when section is not found in .gitmodules' '
git reset --hard &&