@@ -147,7 +147,7 @@ test_expect_success 'am applies patch correctly' '
147
147
git checkout first &&
148
148
test_tick &&
149
149
git am <patch1 &&
150
- ! test -d .git/rebase-apply &&
150
+ test_path_is_missing .git/rebase-apply &&
151
151
git diff --exit-code second &&
152
152
test "$(git rev-parse second)" = "$(git rev-parse HEAD)" &&
153
153
test "$(git rev-parse second^)" = "$(git rev-parse HEAD^)"
@@ -158,7 +158,7 @@ test_expect_success 'am applies patch e-mail not in a mbox' '
158
158
git reset --hard &&
159
159
git checkout first &&
160
160
git am patch1.eml &&
161
- ! test -d .git/rebase-apply &&
161
+ test_path_is_missing .git/rebase-apply &&
162
162
git diff --exit-code second &&
163
163
test "$(git rev-parse second)" = "$(git rev-parse HEAD)" &&
164
164
test "$(git rev-parse second^)" = "$(git rev-parse HEAD^)"
@@ -169,7 +169,7 @@ test_expect_success 'am applies patch e-mail not in a mbox with CRLF' '
169
169
git reset --hard &&
170
170
git checkout first &&
171
171
git am patch1-crlf.eml &&
172
- ! test -d .git/rebase-apply &&
172
+ test_path_is_missing .git/rebase-apply &&
173
173
git diff --exit-code second &&
174
174
test "$(git rev-parse second)" = "$(git rev-parse HEAD)" &&
175
175
test "$(git rev-parse second^)" = "$(git rev-parse HEAD^)"
@@ -180,7 +180,7 @@ test_expect_success 'am applies patch e-mail with preceding whitespace' '
180
180
git reset --hard &&
181
181
git checkout first &&
182
182
git am patch1-ws.eml &&
183
- ! test -d .git/rebase-apply &&
183
+ test_path_is_missing .git/rebase-apply &&
184
184
git diff --exit-code second &&
185
185
test "$(git rev-parse second)" = "$(git rev-parse HEAD)" &&
186
186
test "$(git rev-parse second^)" = "$(git rev-parse HEAD^)"
@@ -206,7 +206,7 @@ test_expect_success 'am changes committer and keeps author' '
206
206
git reset --hard &&
207
207
git checkout first &&
208
208
git am patch2 &&
209
- ! test -d .git/rebase-apply &&
209
+ test_path_is_missing .git/rebase-apply &&
210
210
test "$(git rev-parse master^^)" = "$(git rev-parse HEAD^^)" &&
211
211
git diff --exit-code master..HEAD &&
212
212
git diff --exit-code master^..HEAD^ &&
@@ -258,7 +258,7 @@ test_expect_success 'am --keep really keeps the subject' '
258
258
git reset --hard &&
259
259
git checkout HEAD^ &&
260
260
git am --keep patch4 &&
261
- ! test -d .git/rebase-apply &&
261
+ test_path_is_missing .git/rebase-apply &&
262
262
git cat-file commit HEAD >actual &&
263
263
grep "Re: Re: Re: \[PATCH 1/5 v2\] \[foo\] third" actual
264
264
'
@@ -268,7 +268,7 @@ test_expect_success 'am --keep-non-patch really keeps the non-patch part' '
268
268
git reset --hard &&
269
269
git checkout HEAD^ &&
270
270
git am --keep-non-patch patch4 &&
271
- ! test -d .git/rebase-apply &&
271
+ test_path_is_missing .git/rebase-apply &&
272
272
git cat-file commit HEAD >actual &&
273
273
grep "^\[foo\] third" actual
274
274
'
@@ -283,7 +283,7 @@ test_expect_success 'am -3 falls back to 3-way merge' '
283
283
test_tick &&
284
284
git commit -m "copied stuff" &&
285
285
git am -3 lorem-move.patch &&
286
- ! test -d .git/rebase-apply &&
286
+ test_path_is_missing .git/rebase-apply &&
287
287
git diff --exit-code lorem
288
288
'
289
289
@@ -297,7 +297,7 @@ test_expect_success 'am -3 -p0 can read --no-prefix patch' '
297
297
test_tick &&
298
298
git commit -m "copied stuff" &&
299
299
git am -3 -p0 lorem-zero.patch &&
300
- ! test -d .git/rebase-apply &&
300
+ test_path_is_missing .git/rebase-apply &&
301
301
git diff --exit-code lorem
302
302
'
303
303
@@ -307,7 +307,7 @@ test_expect_success 'am can rename a file' '
307
307
git reset --hard &&
308
308
git checkout lorem^0 &&
309
309
git am rename.patch &&
310
- ! test -d .git/rebase-apply &&
310
+ test_path_is_missing .git/rebase-apply &&
311
311
git update-index --refresh &&
312
312
git diff --exit-code rename
313
313
'
@@ -318,7 +318,7 @@ test_expect_success 'am -3 can rename a file' '
318
318
git reset --hard &&
319
319
git checkout lorem^0 &&
320
320
git am -3 rename.patch &&
321
- ! test -d .git/rebase-apply &&
321
+ test_path_is_missing .git/rebase-apply &&
322
322
git update-index --refresh &&
323
323
git diff --exit-code rename
324
324
'
@@ -329,7 +329,7 @@ test_expect_success 'am -3 can rename a file after falling back to 3-way merge'
329
329
git reset --hard &&
330
330
git checkout lorem^0 &&
331
331
git am -3 rename-add.patch &&
332
- ! test -d .git/rebase-apply &&
332
+ test_path_is_missing .git/rebase-apply &&
333
333
git update-index --refresh &&
334
334
git diff --exit-code rename
335
335
'
@@ -358,7 +358,7 @@ test_expect_success 'am pauses on conflict' '
358
358
test_expect_success ' am --skip works' '
359
359
echo goodbye >expected &&
360
360
git am --skip &&
361
- ! test -d .git/rebase-apply &&
361
+ test_path_is_missing .git/rebase-apply &&
362
362
git diff --exit-code lorem2^^ -- file &&
363
363
test_cmp expected another
364
364
'
@@ -379,7 +379,7 @@ test_expect_success 'am --resolved works' '
379
379
echo resolved >>file &&
380
380
git add file &&
381
381
git am --resolved &&
382
- ! test -d .git/rebase-apply &&
382
+ test_path_is_missing .git/rebase-apply &&
383
383
test_cmp expected another
384
384
'
385
385
@@ -388,7 +388,7 @@ test_expect_success 'am takes patches from a Pine mailbox' '
388
388
git reset --hard &&
389
389
git checkout first &&
390
390
cat pine patch1 | git am &&
391
- ! test -d .git/rebase-apply &&
391
+ test_path_is_missing .git/rebase-apply &&
392
392
git diff --exit-code master^..HEAD
393
393
'
394
394
@@ -397,7 +397,7 @@ test_expect_success 'am fails on mail without patch' '
397
397
git reset --hard &&
398
398
test_must_fail git am <failmail &&
399
399
git am --abort &&
400
- ! test -d .git/rebase-apply
400
+ test_path_is_missing .git/rebase-apply
401
401
'
402
402
403
403
test_expect_success ' am fails on empty patch' '
@@ -406,7 +406,7 @@ test_expect_success 'am fails on empty patch' '
406
406
echo "---" >>failmail &&
407
407
test_must_fail git am <failmail &&
408
408
git am --skip &&
409
- ! test -d .git/rebase-apply
409
+ test_path_is_missing .git/rebase-apply
410
410
'
411
411
412
412
test_expect_success ' am works from stdin in subdirectory' '
0 commit comments