diff options
author | Richard Hansen <hansenr@google.com> | 2017-01-10 15:41:58 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-01-10 13:22:20 -0800 |
commit | fef6c06d6401458f47b5beb9822c75c74a2eb07f (patch) | |
tree | 4cb863ec15bda7d05a7feac84ee41c6ef291fc60 /t | |
parent | t7610: always work on a test-specific branch (diff) | |
download | tgif-fef6c06d6401458f47b5beb9822c75c74a2eb07f.tar.xz |
t7610: don't assume the checked-out commit
Always check out the required commit at the beginning of the test so
that a failure in a previous test does not cause the test to work off
of the wrong commit.
This is a step toward making the tests more independent so that if one
test fails it doesn't cause subsequent tests to fail.
Signed-off-by: Richard Hansen <hansenr@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-x | t/t7610-mergetool.sh | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/t/t7610-mergetool.sh b/t/t7610-mergetool.sh index 87562d8d4d..e8ada8f128 100755 --- a/t/t7610-mergetool.sh +++ b/t/t7610-mergetool.sh @@ -184,7 +184,7 @@ test_expect_success 'mergetool in subdir' ' test_expect_success 'mergetool on file in parent dir' ' test_when_finished "git reset --hard" && - git checkout -b test$test_count && + git checkout -b test$test_count branch1 && git submodule update -N && ( cd subdir && @@ -218,7 +218,7 @@ test_expect_success 'mergetool skips autoresolved' ' test_expect_success 'mergetool merges all from subdir' ' test_when_finished "git reset --hard" && - git checkout -b test$test_count && + git checkout -b test$test_count branch1 && test_config rerere.enabled false && ( cd subdir && @@ -306,7 +306,7 @@ test_expect_success 'mergetool delete/delete conflict' ' test_expect_success 'mergetool produces no errors when keepBackup is used' ' test_when_finished "git reset --hard HEAD" && - git checkout -b test$test_count && + git checkout -b test$test_count move-to-c && test_config mergetool.keepBackup true && test_must_fail git merge move-to-b && : >expect && @@ -317,7 +317,7 @@ test_expect_success 'mergetool produces no errors when keepBackup is used' ' test_expect_success 'mergetool honors tempfile config for deleted files' ' test_when_finished "git reset --hard HEAD" && - git checkout -b test$test_count && + git checkout -b test$test_count move-to-c && test_config mergetool.keepTemporaries false && test_must_fail git merge move-to-b && echo d | git mergetool a/a/file.txt && @@ -327,7 +327,7 @@ test_expect_success 'mergetool honors tempfile config for deleted files' ' test_expect_success 'mergetool keeps tempfiles when aborting delete/delete' ' test_when_finished "git reset --hard HEAD" && test_when_finished "git clean -fdx" && - git checkout -b test$test_count && + git checkout -b test$test_count move-to-c && test_config mergetool.keepTemporaries true && test_must_fail git merge move-to-b && ! (echo a; echo n) | git mergetool a/a/file.txt && @@ -664,7 +664,7 @@ test_expect_success 'diff.orderFile configuration is honored' ' ' test_expect_success 'mergetool -Oorder-file is honored' ' test_when_finished "git reset --hard >/dev/null 2>&1" && - git checkout -b test$test_count && + git checkout -b test$test_count order-file-side2 && test_config diff.orderFile order-file && test_config mergetool.myecho.cmd "echo \"\$LOCAL\"" && test_config mergetool.myecho.trustExitCode true && |