summaryrefslogtreecommitdiff
path: root/t/t3602-rm-sparse-checkout.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t3602-rm-sparse-checkout.sh')
-rwxr-xr-xt/t3602-rm-sparse-checkout.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t3602-rm-sparse-checkout.sh b/t/t3602-rm-sparse-checkout.sh
index e9e9a15c74..493c8f636b 100755
--- a/t/t3602-rm-sparse-checkout.sh
+++ b/t/t3602-rm-sparse-checkout.sh
@@ -43,6 +43,18 @@ test_expect_success 'recursive rm does not remove sparse entries' '
test_cmp expected actual
'
+test_expect_success 'recursive rm --sparse removes sparse entries' '
+ git reset --hard &&
+ git sparse-checkout set "sub/dir" &&
+ git rm --sparse -r sub &&
+ git status --porcelain -uno >actual &&
+ cat >expected <<-\EOF &&
+ D sub/d
+ D sub/dir/e
+ EOF
+ test_cmp expected actual
+'
+
test_expect_success 'rm obeys advice.updateSparsePath' '
git reset --hard &&
git sparse-checkout set a &&