@@ -93,9 +93,9 @@ test_expect_success 'test . as a remote' '
93
93
echo updated >file &&
94
94
git commit -a -m updated &&
95
95
git checkout copy &&
96
- test ` cat file` = file &&
96
+ test "$( cat file)" = file &&
97
97
git pull &&
98
- test ` cat file` = updated
98
+ test "$( cat file)" = updated
99
99
'
100
100
101
101
test_expect_success ' the default remote . should not break explicit pull' '
@@ -104,9 +104,9 @@ test_expect_success 'the default remote . should not break explicit pull' '
104
104
git commit -a -m modified &&
105
105
git checkout copy &&
106
106
git reset --hard HEAD^ &&
107
- test ` cat file` = file &&
107
+ test "$( cat file)" = file &&
108
108
git pull . second &&
109
- test ` cat file` = modified
109
+ test "$( cat file)" = modified
110
110
'
111
111
112
112
test_expect_success ' --rebase' '
@@ -119,32 +119,32 @@ test_expect_success '--rebase' '
119
119
git commit -m "new file" &&
120
120
git tag before-rebase &&
121
121
git pull --rebase . copy &&
122
- test $(git rev-parse HEAD^) = $(git rev-parse copy) &&
123
- test new = $(git show HEAD:file2)
122
+ test " $(git rev-parse HEAD^)" = " $(git rev-parse copy)" &&
123
+ test new = " $(git show HEAD:file2)"
124
124
'
125
125
test_expect_success ' pull.rebase' '
126
126
git reset --hard before-rebase &&
127
127
test_config pull.rebase true &&
128
128
git pull . copy &&
129
- test $(git rev-parse HEAD^) = $(git rev-parse copy) &&
130
- test new = $(git show HEAD:file2)
129
+ test " $(git rev-parse HEAD^)" = " $(git rev-parse copy)" &&
130
+ test new = " $(git show HEAD:file2)"
131
131
'
132
132
133
133
test_expect_success ' branch.to-rebase.rebase' '
134
134
git reset --hard before-rebase &&
135
135
test_config branch.to-rebase.rebase true &&
136
136
git pull . copy &&
137
- test $(git rev-parse HEAD^) = $(git rev-parse copy) &&
138
- test new = $(git show HEAD:file2)
137
+ test " $(git rev-parse HEAD^)" = " $(git rev-parse copy)" &&
138
+ test new = " $(git show HEAD:file2)"
139
139
'
140
140
141
141
test_expect_success ' branch.to-rebase.rebase should override pull.rebase' '
142
142
git reset --hard before-rebase &&
143
143
test_config pull.rebase true &&
144
144
test_config branch.to-rebase.rebase false &&
145
145
git pull . copy &&
146
- test $(git rev-parse HEAD^) != $(git rev-parse copy) &&
147
- test new = $(git show HEAD:file2)
146
+ test " $(git rev-parse HEAD^)" != " $(git rev-parse copy)" &&
147
+ test new = " $(git show HEAD:file2)"
148
148
'
149
149
150
150
# add a feature branch, keep-merge, that is merged into master, so the
@@ -163,33 +163,33 @@ test_expect_success 'pull.rebase=false create a new merge commit' '
163
163
git reset --hard before-preserve-rebase &&
164
164
test_config pull.rebase false &&
165
165
git pull . copy &&
166
- test $(git rev-parse HEAD^1) = $(git rev-parse before-preserve-rebase) &&
167
- test $(git rev-parse HEAD^2) = $(git rev-parse copy) &&
168
- test file3 = $(git show HEAD:file3.t)
166
+ test " $(git rev-parse HEAD^1)" = " $(git rev-parse before-preserve-rebase)" &&
167
+ test " $(git rev-parse HEAD^2)" = " $(git rev-parse copy)" &&
168
+ test file3 = " $(git show HEAD:file3.t)"
169
169
'
170
170
171
171
test_expect_success ' pull.rebase=true flattens keep-merge' '
172
172
git reset --hard before-preserve-rebase &&
173
173
test_config pull.rebase true &&
174
174
git pull . copy &&
175
- test $(git rev-parse HEAD^^) = $(git rev-parse copy) &&
176
- test file3 = $(git show HEAD:file3.t)
175
+ test " $(git rev-parse HEAD^^)" = " $(git rev-parse copy)" &&
176
+ test file3 = " $(git show HEAD:file3.t)"
177
177
'
178
178
179
179
test_expect_success ' pull.rebase=1 is treated as true and flattens keep-merge' '
180
180
git reset --hard before-preserve-rebase &&
181
181
test_config pull.rebase 1 &&
182
182
git pull . copy &&
183
- test $(git rev-parse HEAD^^) = $(git rev-parse copy) &&
184
- test file3 = $(git show HEAD:file3.t)
183
+ test " $(git rev-parse HEAD^^)" = " $(git rev-parse copy)" &&
184
+ test file3 = " $(git show HEAD:file3.t)"
185
185
'
186
186
187
187
test_expect_success ' pull.rebase=preserve rebases and merges keep-merge' '
188
188
git reset --hard before-preserve-rebase &&
189
189
test_config pull.rebase preserve &&
190
190
git pull . copy &&
191
- test $(git rev-parse HEAD^^) = $(git rev-parse copy) &&
192
- test $(git rev-parse HEAD^2) = $(git rev-parse keep-merge)
191
+ test " $(git rev-parse HEAD^^)" = " $(git rev-parse copy)" &&
192
+ test " $(git rev-parse HEAD^2)" = " $(git rev-parse keep-merge)"
193
193
'
194
194
195
195
test_expect_success ' pull.rebase=invalid fails' '
@@ -202,25 +202,25 @@ test_expect_success '--rebase=false create a new merge commit' '
202
202
git reset --hard before-preserve-rebase &&
203
203
test_config pull.rebase true &&
204
204
git pull --rebase=false . copy &&
205
- test $(git rev-parse HEAD^1) = $(git rev-parse before-preserve-rebase) &&
206
- test $(git rev-parse HEAD^2) = $(git rev-parse copy) &&
207
- test file3 = $(git show HEAD:file3.t)
205
+ test " $(git rev-parse HEAD^1)" = " $(git rev-parse before-preserve-rebase)" &&
206
+ test " $(git rev-parse HEAD^2)" = " $(git rev-parse copy)" &&
207
+ test file3 = " $(git show HEAD:file3.t)"
208
208
'
209
209
210
210
test_expect_success ' --rebase=true rebases and flattens keep-merge' '
211
211
git reset --hard before-preserve-rebase &&
212
212
test_config pull.rebase preserve &&
213
213
git pull --rebase=true . copy &&
214
- test $(git rev-parse HEAD^^) = $(git rev-parse copy) &&
215
- test file3 = $(git show HEAD:file3.t)
214
+ test " $(git rev-parse HEAD^^)" = " $(git rev-parse copy)" &&
215
+ test file3 = " $(git show HEAD:file3.t)"
216
216
'
217
217
218
218
test_expect_success ' --rebase=preserve rebases and merges keep-merge' '
219
219
git reset --hard before-preserve-rebase &&
220
220
test_config pull.rebase true &&
221
221
git pull --rebase=preserve . copy &&
222
- test $(git rev-parse HEAD^^) = $(git rev-parse copy) &&
223
- test $(git rev-parse HEAD^2) = $(git rev-parse keep-merge)
222
+ test " $(git rev-parse HEAD^^)" = " $(git rev-parse copy)" &&
223
+ test " $(git rev-parse HEAD^2)" = " $(git rev-parse keep-merge)"
224
224
'
225
225
226
226
test_expect_success ' --rebase=invalid fails' '
@@ -232,8 +232,8 @@ test_expect_success '--rebase overrides pull.rebase=preserve and flattens keep-m
232
232
git reset --hard before-preserve-rebase &&
233
233
test_config pull.rebase preserve &&
234
234
git pull --rebase . copy &&
235
- test $(git rev-parse HEAD^^) = $(git rev-parse copy) &&
236
- test file3 = $(git show HEAD:file3.t)
235
+ test " $(git rev-parse HEAD^^)" = " $(git rev-parse copy)" &&
236
+ test file3 = " $(git show HEAD:file3.t)"
237
237
'
238
238
239
239
test_expect_success ' --rebase with rebased upstream' '
@@ -250,7 +250,7 @@ test_expect_success '--rebase with rebased upstream' '
250
250
git tag to-rebase-orig &&
251
251
git pull --rebase me copy &&
252
252
test "conflicting modification" = "$(cat file)" &&
253
- test file = $(cat file2)
253
+ test file = " $(cat file2)"
254
254
255
255
'
256
256
@@ -261,7 +261,7 @@ test_expect_success '--rebase with rebased default upstream' '
261
261
git reset --hard to-rebase-orig &&
262
262
git pull --rebase &&
263
263
test "conflicting modification" = "$(cat file)" &&
264
- test file = $(cat file2)
264
+ test file = " $(cat file2)"
265
265
266
266
'
267
267
@@ -282,18 +282,18 @@ test_expect_success 'pull --rebase dies early with dirty working directory' '
282
282
283
283
git checkout to-rebase &&
284
284
git update-ref refs/remotes/me/copy copy^ &&
285
- COPY=$(git rev-parse --verify me/copy) &&
285
+ COPY=" $(git rev-parse --verify me/copy)" &&
286
286
git rebase --onto $COPY copy &&
287
287
test_config branch.to-rebase.remote me &&
288
288
test_config branch.to-rebase.merge refs/heads/copy &&
289
289
test_config branch.to-rebase.rebase true &&
290
290
echo dirty >> file &&
291
291
git add file &&
292
292
test_must_fail git pull &&
293
- test $COPY = $(git rev-parse --verify me/copy) &&
293
+ test " $COPY" = " $(git rev-parse --verify me/copy)" &&
294
294
git checkout HEAD -- file &&
295
295
git pull &&
296
- test $COPY != $(git rev-parse --verify me/copy)
296
+ test " $COPY" != " $(git rev-parse --verify me/copy)"
297
297
298
298
'
299
299
0 commit comments