summaryrefslogtreecommitdiffstats
path: root/t/t1091-sparse-checkout-builtin.sh
diff options
context:
space:
mode:
authorDerrick Stolee <dstolee@microsoft.com>2020-01-31 21:16:12 +0100
committerJunio C Hamano <gitster@pobox.com>2020-01-31 22:05:29 +0100
commite55682ea2640dd3aa002a2657c32bdd1d85b44e9 (patch)
treec9fa0d126b1261bf9c78390a1018945819a84862 /t/t1091-sparse-checkout-builtin.sh
parentsparse-checkout: unquote C-style strings over --stdin (diff)
downloadgit-e55682ea2640dd3aa002a2657c32bdd1d85b44e9.tar.xz
git-e55682ea2640dd3aa002a2657c32bdd1d85b44e9.zip
sparse-checkout: use C-style quotes in 'list' subcommand
When in cone mode, the 'git sparse-checkout list' subcommand lists the directories included in the sparse cone. When these directories contain odd characters, such as a backslash, then we need to use C-style quotes similar to 'git ls-tree'. Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1091-sparse-checkout-builtin.sh')
-rwxr-xr-xt/t1091-sparse-checkout-builtin.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/t/t1091-sparse-checkout-builtin.sh b/t/t1091-sparse-checkout-builtin.sh
index a46a310740..545e8d5ebe 100755
--- a/t/t1091-sparse-checkout-builtin.sh
+++ b/t/t1091-sparse-checkout-builtin.sh
@@ -406,7 +406,8 @@ test_expect_success BSLASHPSPEC 'pattern-checks: escaped "*"' '
EOF
test_cmp expect escaped/.git/info/sparse-checkout &&
check_read_tree_errors escaped "a zbad\\dir zdoes*exist" &&
- git -C escaped ls-tree -d --name-only HEAD | git -C escaped sparse-checkout set --stdin &&
+ git -C escaped ls-tree -d --name-only HEAD >list-expect &&
+ git -C escaped sparse-checkout set --stdin <list-expect &&
cat >expect <<-\EOF &&
/*
!/*/
@@ -417,7 +418,9 @@ test_expect_success BSLASHPSPEC 'pattern-checks: escaped "*"' '
/zdoes\*exist/
EOF
test_cmp expect escaped/.git/info/sparse-checkout &&
- check_files escaped "a deep folder1 folder2 zbad\\dir zdoes*exist"
+ check_files escaped "a deep folder1 folder2 zbad\\dir zdoes*exist" &&
+ git -C escaped sparse-checkout list >list-actual &&
+ test_cmp list-expect list-actual
'
test_done