t7610-mergetool: use test_config to isolate tests

Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
David Aguilar 2014-10-15 22:30:04 -07:00 committed by Junio C Hamano
parent 4756c05741
commit d7d300ea59

View file

@ -112,7 +112,7 @@ test_expect_success 'custom mergetool' '
'
test_expect_success 'mergetool crlf' '
git config core.autocrlf true &&
test_config core.autocrlf true &&
git checkout -b test2 branch1 &&
test_must_fail git merge master >/dev/null 2>&1 &&
( yes "" | git mergetool file1 >/dev/null 2>&1 ) &&
@ -505,14 +505,12 @@ test_expect_success 'file with no base' '
test_expect_success 'custom commands override built-ins' '
git checkout -b test14 branch1 &&
git config mergetool.defaults.cmd "cat \"\$REMOTE\" >\"\$MERGED\"" &&
git config mergetool.defaults.trustExitCode true &&
test_config mergetool.defaults.cmd "cat \"\$REMOTE\" >\"\$MERGED\"" &&
test_config mergetool.defaults.trustExitCode true &&
test_must_fail git merge master &&
git mergetool --no-prompt --tool defaults -- both &&
echo master both added >expected &&
test_cmp both expected &&
git config --unset mergetool.defaults.cmd &&
git config --unset mergetool.defaults.trustExitCode &&
git reset --hard master >/dev/null 2>&1
'