t7610: spell 'git reset --hard' consistently
Signed-off-by: Richard Hansen <hansenr@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Richard Hansen committed
Jan 10, 2017 at 15:41 UTC
bd9714f2533e8264422811098d0e1b13134094e9
1 file changed
+19
-18
t/t7610-mergetool.sh
+19
-18
@@ -289,23 +289,23 @@ test_expect_success 'mergetool takes partial path' '
289
'
290
291
test_expect_success 'mergetool delete/delete conflict' '
292
- test_when_finished "git reset --hard HEAD" &&
292
+ test_when_finished "git reset --hard" &&
293
git checkout -b test$test_count move-to-c &&
294
test_must_fail git merge move-to-b &&
295
echo d | git mergetool a/a/file.txt &&
296
! test -f a/a/file.txt &&
297
- git reset --hard HEAD &&
297
+ git reset --hard &&
298
test_must_fail git merge move-to-b &&
299
echo m | git mergetool a/a/file.txt &&
300
test -f b/b/file.txt &&
301
- git reset --hard HEAD &&
301
+ git reset --hard &&
302
test_must_fail git merge move-to-b &&
303
! echo a | git mergetool a/a/file.txt &&
304
! test -f a/a/file.txt
305
'
306
307
test_expect_success 'mergetool produces no errors when keepBackup is used' '
308
- test_when_finished "git reset --hard HEAD" &&
308
+ test_when_finished "git reset --hard" &&
309
git checkout -b test$test_count move-to-c &&
310
test_config mergetool.keepBackup true &&
311
test_must_fail git merge move-to-b &&
@@ -316,7 +316,7 @@ test_expect_success 'mergetool produces no errors when keepBackup is used' '
316
'
317
318
test_expect_success 'mergetool honors tempfile config for deleted files' '
319
- test_when_finished "git reset --hard HEAD" &&
319
+ test_when_finished "git reset --hard" &&
320
git checkout -b test$test_count move-to-c &&
321
test_config mergetool.keepTemporaries false &&
322
test_must_fail git merge move-to-b &&
@@ -325,7 +325,7 @@ test_expect_success 'mergetool honors tempfile config for deleted files' '
325
'
326
327
test_expect_success 'mergetool keeps tempfiles when aborting delete/delete' '
328
- test_when_finished "git reset --hard HEAD" &&
328
+ test_when_finished "git reset --hard" &&
329
test_when_finished "git clean -fdx" &&
330
git checkout -b test$test_count move-to-c &&
331
test_config mergetool.keepTemporaries true &&
@@ -342,7 +342,7 @@ test_expect_success 'mergetool keeps tempfiles when aborting delete/delete' '
342
'
343
344
test_expect_success 'deleted vs modified submodule' '
345
- test_when_finished "git reset --hard HEAD" &&
345
+ test_when_finished "git reset --hard" &&
346
git checkout -b test$test_count branch1 &&
347
git submodule update -N &&
348
mv submod submod-movedaside &&
@@ -560,7 +560,7 @@ test_expect_success 'directory vs modified submodule' '
560
test "$(cat submod/file16)" = "not a submodule" &&
561
rm -rf submod.orig &&
562
563
- git reset --hard >/dev/null 2>&1 &&
563
+ git reset --hard &&
564
test_must_fail git merge master &&
565
test -n "$(git ls-files -u)" &&
566
test ! -e submod.orig &&
@@ -572,7 +572,8 @@ test_expect_success 'directory vs modified submodule' '
572
( cd submod && git clean -f && git reset --hard ) &&
573
git submodule update -N &&
574
test "$(cat submod/bar)" = "master submodule" &&
575
- git reset --hard >/dev/null 2>&1 && rm -rf submod-movedaside &&
575
+ git reset --hard &&
576
+ rm -rf submod-movedaside &&
577
578
git checkout -b test$test_count.c master &&
579
git submodule update -N &&
@@ -582,7 +583,7 @@ test_expect_success 'directory vs modified submodule' '
583
git submodule update -N &&
584
test "$(cat submod/bar)" = "master submodule" &&
585
585
- git reset --hard >/dev/null 2>&1 &&
586
+ git reset --hard &&
587
git submodule update -N &&
588
test_must_fail git merge test$test_count &&
589
test -n "$(git ls-files -u)" &&
@@ -590,13 +591,13 @@ test_expect_success 'directory vs modified submodule' '
591
( yes "r" | git mergetool submod ) &&
592
test "$(cat submod/file16)" = "not a submodule" &&
593
593
- git reset --hard master >/dev/null 2>&1 &&
594
+ git reset --hard master &&
595
( cd submod && git clean -f && git reset --hard ) &&
596
git submodule update -N
597
'
598
599
test_expect_success 'file with no base' '
599
- test_when_finished "git reset --hard master >/dev/null 2>&1" &&
600
+ test_when_finished "git reset --hard" &&
601
git checkout -b test$test_count branch1 &&
602
test_must_fail git merge master &&
603
git mergetool --no-prompt --tool mybase -- both &&
@@ -605,7 +606,7 @@ test_expect_success 'file with no base' '
606
'
607
608
test_expect_success 'custom commands override built-ins' '
608
- test_when_finished "git reset --hard master >/dev/null 2>&1" &&
609
+ test_when_finished "git reset --hard" &&
610
git checkout -b test$test_count branch1 &&
611
test_config mergetool.defaults.cmd "cat \"\$REMOTE\" >\"\$MERGED\"" &&
612
test_config mergetool.defaults.trustExitCode true &&
@@ -616,7 +617,7 @@ test_expect_success 'custom commands override built-ins' '
617
'
618
619
test_expect_success 'filenames seen by tools start with ./' '
619
- test_when_finished "git reset --hard master >/dev/null 2>&1" &&
620
+ test_when_finished "git reset --hard" &&
621
git checkout -b test$test_count branch1 &&
622
test_config mergetool.writeToTemp false &&
623
test_config mergetool.myecho.cmd "echo \"\$LOCAL\"" &&
@@ -633,7 +634,7 @@ test_lazy_prereq MKTEMP '
634
'
635
636
test_expect_success MKTEMP 'temporary filenames are used with mergetool.writeToTemp' '
636
- test_when_finished "git reset --hard master >/dev/null 2>&1" &&
637
+ test_when_finished "git reset --hard" &&
638
git checkout -b test$test_count branch1 &&
639
test_config mergetool.writeToTemp true &&
640
test_config mergetool.myecho.cmd "echo \"\$LOCAL\"" &&
@@ -645,7 +646,7 @@ test_expect_success MKTEMP 'temporary filenames are used with mergetool.writeToT
646
'
647
648
test_expect_success 'diff.orderFile configuration is honored' '
648
- test_when_finished "git reset --hard >/dev/null" &&
649
+ test_when_finished "git reset --hard" &&
650
git checkout -b test$test_count order-file-side2 &&
651
test_config diff.orderFile order-file &&
652
test_config mergetool.myecho.cmd "echo \"\$LOCAL\"" &&
@@ -663,7 +664,7 @@ test_expect_success 'diff.orderFile configuration is honored' '
664
test_cmp expect actual
665
'
666
test_expect_success 'mergetool -Oorder-file is honored' '
666
- test_when_finished "git reset --hard >/dev/null 2>&1" &&
667
+ test_when_finished "git reset --hard" &&
668
git checkout -b test$test_count order-file-side2 &&
669
test_config diff.orderFile order-file &&
670
test_config mergetool.myecho.cmd "echo \"\$LOCAL\"" &&
@@ -679,7 +680,7 @@ test_expect_success 'mergetool -Oorder-file is honored' '
680
git mergetool -O/dev/null --no-prompt --tool myecho >output &&
681
git grep --no-index -h -A2 Merging: output >actual &&
682
test_cmp expect actual &&
682
- git reset --hard >/dev/null 2>&1 &&
683
+ git reset --hard &&
684
685
git config --unset diff.orderFile &&
686
test_must_fail git merge order-file-side1 &&