summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rwxr-xr-xt/t1091-sparse-checkout-builtin.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/t/t1091-sparse-checkout-builtin.sh b/t/t1091-sparse-checkout-builtin.sh
index e28e1c797f..43d1f7520c 100755
--- a/t/t1091-sparse-checkout-builtin.sh
+++ b/t/t1091-sparse-checkout-builtin.sh
@@ -295,4 +295,14 @@ test_expect_success 'interaction with submodules' '
check_files super/modules/child a deep folder1 folder2
'
+test_expect_success 'different sparse-checkouts with worktrees' '
+ git -C repo worktree add --detach ../worktree &&
+ check_files worktree "a deep folder1 folder2" &&
+ git -C worktree sparse-checkout init --cone &&
+ git -C repo sparse-checkout set folder1 &&
+ git -C worktree sparse-checkout set deep/deeper1 &&
+ check_files repo a folder1 &&
+ check_files worktree a deep
+'
+
test_done