File tree 5 files changed +45
-11
lines changed 5 files changed +45
-11
lines changed Original file line number Diff line number Diff line change @@ -109,7 +109,11 @@ test_expect_success 'CRLF delimiters' '
109
109
test_expect_success ' quotes' '
110
110
restore_checkpoint &&
111
111
112
- printf "\"file\\101.t\"" | git checkout --pathspec-from-file=- HEAD^1 &&
112
+ cat >list <<-\EOF &&
113
+ "file\101.t"
114
+ EOF
115
+
116
+ git checkout --pathspec-from-file=list HEAD^1 &&
113
117
114
118
cat >expect <<-\EOF &&
115
119
M fileA.t
@@ -120,7 +124,10 @@ test_expect_success 'quotes' '
120
124
test_expect_success ' quotes not compatible with --pathspec-file-nul' '
121
125
restore_checkpoint &&
122
126
123
- printf "\"file\\101.t\"" >list &&
127
+ cat >list <<-\EOF &&
128
+ "file\101.t"
129
+ EOF
130
+
124
131
test_must_fail git checkout --pathspec-from-file=list --pathspec-file-nul HEAD^1
125
132
'
126
133
Original file line number Diff line number Diff line change @@ -109,7 +109,11 @@ test_expect_success 'CRLF delimiters' '
109
109
test_expect_success ' quotes' '
110
110
restore_checkpoint &&
111
111
112
- printf "\"file\\101.t\"" | git restore --pathspec-from-file=- --source=HEAD^1 &&
112
+ cat >list <<-\EOF &&
113
+ "file\101.t"
114
+ EOF
115
+
116
+ git restore --pathspec-from-file=list --source=HEAD^1 &&
113
117
114
118
cat >expect <<-\EOF &&
115
119
M fileA.t
@@ -120,7 +124,10 @@ test_expect_success 'quotes' '
120
124
test_expect_success ' quotes not compatible with --pathspec-file-nul' '
121
125
restore_checkpoint &&
122
126
123
- printf "\"file\\101.t\"" >list &&
127
+ cat >list <<-\EOF &&
128
+ "file\101.t"
129
+ EOF
130
+
124
131
test_must_fail git restore --pathspec-from-file=list --pathspec-file-nul --source=HEAD^1
125
132
'
126
133
Original file line number Diff line number Diff line change @@ -97,7 +97,11 @@ test_expect_success 'CRLF delimiters' '
97
97
test_expect_success ' quotes' '
98
98
restore_checkpoint &&
99
99
100
- printf "\"file\\101.t\"" | git add --pathspec-from-file=- &&
100
+ cat >list <<-\EOF &&
101
+ "file\101.t"
102
+ EOF
103
+
104
+ git add --pathspec-from-file=list &&
101
105
102
106
cat >expect <<-\EOF &&
103
107
A fileA.t
@@ -108,7 +112,10 @@ test_expect_success 'quotes' '
108
112
test_expect_success ' quotes not compatible with --pathspec-file-nul' '
109
113
restore_checkpoint &&
110
114
111
- printf "\"file\\101.t\"" >list &&
115
+ cat >list <<-\EOF &&
116
+ "file\101.t"
117
+ EOF
118
+
112
119
test_must_fail git add --pathspec-from-file=list --pathspec-file-nul
113
120
'
114
121
Original file line number Diff line number Diff line change @@ -105,8 +105,12 @@ test_expect_success 'CRLF delimiters' '
105
105
test_expect_success ' quotes' '
106
106
restore_checkpoint &&
107
107
108
+ cat >list <<-\EOF &&
109
+ "file\101.t"
110
+ EOF
111
+
108
112
git rm fileA.t &&
109
- printf "\"file\\101.t\"" | git reset --pathspec-from-file=- &&
113
+ git reset --pathspec-from-file=list &&
110
114
111
115
cat >expect <<-\EOF &&
112
116
D fileA.t
@@ -117,8 +121,10 @@ test_expect_success 'quotes' '
117
121
test_expect_success ' quotes not compatible with --pathspec-file-nul' '
118
122
restore_checkpoint &&
119
123
120
- git rm fileA.t &&
121
- printf "\"file\\101.t\"" >list &&
124
+ cat >list <<-\EOF &&
125
+ "file\101.t"
126
+ EOF
127
+
122
128
# Note: "git reset" has not yet learned to fail on wrong pathspecs
123
129
git reset --pathspec-from-file=list --pathspec-file-nul &&
124
130
Original file line number Diff line number Diff line change @@ -100,7 +100,11 @@ test_expect_success 'CRLF delimiters' '
100
100
test_expect_success ' quotes' '
101
101
restore_checkpoint &&
102
102
103
- printf "\"file\\101.t\"" | git commit --pathspec-from-file=- -m "Commit" &&
103
+ cat >list <<-\EOF &&
104
+ "file\101.t"
105
+ EOF
106
+
107
+ git commit --pathspec-from-file=list -m "Commit" &&
104
108
105
109
cat >expect <<-\EOF &&
106
110
A fileA.t
@@ -111,7 +115,10 @@ test_expect_success 'quotes' '
111
115
test_expect_success ' quotes not compatible with --pathspec-file-nul' '
112
116
restore_checkpoint &&
113
117
114
- printf "\"file\\101.t\"" >list &&
118
+ cat >list <<-\EOF &&
119
+ "file\101.t"
120
+ EOF
121
+
115
122
test_must_fail git commit --pathspec-from-file=list --pathspec-file-nul -m "Commit"
116
123
'
117
124
You can’t perform that action at this time.
0 commit comments