@@ -109,7 +109,10 @@ test_expect_success 'CRLF delimiters' '
test_expect_success 'quotes' '
restore_checkpoint &&
- printf "\"file\\101.t\"" | git checkout --pathspec-from-file=- HEAD^1 &&
+ # shell takes \\\\101 and spits \\101
+ # printf takes \\101 and spits \101
+ # git takes \101 and spits A
+ printf "\"file\\\\101.t\"" | git checkout --pathspec-from-file=- HEAD^1 &&
cat >expect <<-\EOF &&
M fileA.t
@@ -120,7 +123,9 @@ test_expect_success 'quotes' '
test_expect_success 'quotes not compatible with --pathspec-file-nul' '
restore_checkpoint &&
- printf "\"file\\101.t\"" >list &&
+ # shell takes \\\\101 and spits \\101
+ # printf takes \\101 and spits \101
+ printf "\"file\\\\101.t\"" >list &&
test_must_fail git checkout --pathspec-from-file=list --pathspec-file-nul HEAD^1
'
@@ -109,7 +109,10 @@ test_expect_success 'CRLF delimiters' '
test_expect_success 'quotes' '
restore_checkpoint &&
- printf "\"file\\101.t\"" | git restore --pathspec-from-file=- --source=HEAD^1 &&
+ # shell takes \\\\101 and spits \\101
+ # printf takes \\101 and spits \101
+ # git takes \101 and spits A
+ printf "\"file\\\\101.t\"" | git restore --pathspec-from-file=- --source=HEAD^1 &&
cat >expect <<-\EOF &&
M fileA.t
@@ -120,7 +123,9 @@ test_expect_success 'quotes' '
test_expect_success 'quotes not compatible with --pathspec-file-nul' '
restore_checkpoint &&
- printf "\"file\\101.t\"" >list &&
+ # shell takes \\\\101 and spits \\101
+ # printf takes \\101 and spits \101
+ printf "\"file\\\\101.t\"" >list &&
test_must_fail git restore --pathspec-from-file=list --pathspec-file-nul --source=HEAD^1
'
@@ -97,7 +97,10 @@ test_expect_success 'CRLF delimiters' '
test_expect_success 'quotes' '
restore_checkpoint &&
- printf "\"file\\101.t\"" | git add --pathspec-from-file=- &&
+ # shell takes \\\\101 and spits \\101
+ # printf takes \\101 and spits \101
+ # git takes \101 and spits A
+ printf "\"file\\\\101.t\"" | git add --pathspec-from-file=- &&
cat >expect <<-\EOF &&
A fileA.t
@@ -108,7 +111,9 @@ test_expect_success 'quotes' '
test_expect_success 'quotes not compatible with --pathspec-file-nul' '
restore_checkpoint &&
- printf "\"file\\101.t\"" >list &&
+ # shell takes \\\\101 and spits \\101
+ # printf takes \\101 and spits \101
+ printf "\"file\\\\101.t\"" >list &&
test_must_fail git add --pathspec-from-file=list --pathspec-file-nul
'
@@ -105,8 +105,11 @@ test_expect_success 'CRLF delimiters' '
test_expect_success 'quotes' '
restore_checkpoint &&
+ # shell takes \\\\101 and spits \\101
+ # printf takes \\101 and spits \101
+ # git takes \101 and spits A
git rm fileA.t &&
- printf "\"file\\101.t\"" | git reset --pathspec-from-file=- &&
+ printf "\"file\\\\101.t\"" | git reset --pathspec-from-file=- &&
cat >expect <<-\EOF &&
D fileA.t
@@ -117,8 +120,10 @@ test_expect_success 'quotes' '
test_expect_success 'quotes not compatible with --pathspec-file-nul' '
restore_checkpoint &&
+ # shell takes \\\\101 and spits \\101
+ # printf takes \\101 and spits \101
git rm fileA.t &&
- printf "\"file\\101.t\"" >list &&
+ printf "\"file\\\\101.t\"" >list &&
# Note: "git reset" has not yet learned to fail on wrong pathspecs
git reset --pathspec-from-file=list --pathspec-file-nul &&
@@ -100,7 +100,10 @@ test_expect_success 'CRLF delimiters' '
test_expect_success 'quotes' '
restore_checkpoint &&
- printf "\"file\\101.t\"" | git commit --pathspec-from-file=- -m "Commit" &&
+ # shell takes \\\\101 and spits \\101
+ # printf takes \\101 and spits \101
+ # git takes \101 and spits A
+ printf "\"file\\\\101.t\"" | git commit --pathspec-from-file=- -m "Commit" &&
cat >expect <<-\EOF &&
A fileA.t
@@ -111,7 +114,9 @@ test_expect_success 'quotes' '
test_expect_success 'quotes not compatible with --pathspec-file-nul' '
restore_checkpoint &&
- printf "\"file\\101.t\"" >list &&
+ # shell takes \\\\101 and spits \\101
+ # printf takes \\101 and spits \101
+ printf "\"file\\\\101.t\"" >list &&
test_must_fail git commit --pathspec-from-file=list --pathspec-file-nul -m "Commit"
'