summaryrefslogtreecommitdiff
path: root/t/t7800-difftool.sh
diff options
context:
space:
mode:
authorDavid Aguilar <davvid@gmail.com>2010-03-27 21:58:09 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-03-28 16:29:12 (GMT)
commit42accaec0174f80c81681c4a6f896ca452ba3f76 (patch)
tree5809f9e914e118676549432c4071a344520e8400 /t/t7800-difftool.sh
parentbb6ad28c23f05e1ea04e3f1c6b9b08cc070c5318 (diff)
downloadgit-42accaec0174f80c81681c4a6f896ca452ba3f76.zip
git-42accaec0174f80c81681c4a6f896ca452ba3f76.tar.gz
git-42accaec0174f80c81681c4a6f896ca452ba3f76.tar.bz2
difftool: Fix '--gui' when diff.guitool is unconfigured
When diff.guitool is unconfigured and "--gui" is specified git-difftool dies with the following error message: config diff.guitool: command returned error: 1 Catch the error so that the "--gui" flag is a no-op when diff.guitool is unconfigured. Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7800-difftool.sh')
-rwxr-xr-xt/t7800-difftool.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/t/t7800-difftool.sh b/t/t7800-difftool.sh
index 19c72f5..1de83ef 100755
--- a/t/t7800-difftool.sh
+++ b/t/t7800-difftool.sh
@@ -92,6 +92,15 @@ test_expect_success 'difftool honors --gui' '
restore_test_defaults
'
+test_expect_success 'difftool --gui works without configured diff.guitool' '
+ git config diff.tool test-tool &&
+
+ diff=$(git difftool --no-prompt --gui branch) &&
+ test "$diff" = "branch" &&
+
+ restore_test_defaults
+'
+
# Specify the diff tool using $GIT_DIFF_TOOL
test_expect_success 'GIT_DIFF_TOOL variable' '
git config --unset diff.tool