summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar David Aguilar <davvid@gmail.com>2010-01-09 20:02:42 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2010-01-09 22:41:30 -0800
commit1c6f5b52b7b13bbc6cf404cb5ef9e64fda37655c (patch)
tree99d43713fe0d6097883ef9d254e263bcd3ea34a8 /t
parentdifftool--helper: Remove use of the GIT_MERGE_TOOL variable (diff)
downloadtgif-1c6f5b52b7b13bbc6cf404cb5ef9e64fda37655c.tar.xz
difftool: Allow specifying unconfigured commands with --extcmd
git-difftool requires difftool.<tool>.cmd configuration even when tools use the standard "$diffcmd $from $to" form. This teaches git-difftool to run these tools in lieu of configuration by allowing the command to be specified on the command line. Reference: http://article.gmane.org/gmane.comp.version-control.git/133377 Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t7800-difftool.sh19
1 files changed, 18 insertions, 1 deletions
diff --git a/t/t7800-difftool.sh b/t/t7800-difftool.sh
index eca51a8fe8..8ee186a5fb 100755
--- a/t/t7800-difftool.sh
+++ b/t/t7800-difftool.sh
@@ -214,7 +214,24 @@ test_expect_success 'difftool.<tool>.path' '
diff=$(git difftool --tool=tkdiff --no-prompt branch) &&
git config --unset difftool.tkdiff.path &&
lines=$(echo "$diff" | grep file | wc -l) &&
- test "$lines" -eq 1
+ test "$lines" -eq 1 &&
+
+ restore_test_defaults
+'
+
+test_expect_success 'difftool --extcmd=...' '
+ diff=$(git difftool --no-prompt --extcmd=cat branch) &&
+
+ lines=$(echo "$diff" | wc -l) &&
+ test "$lines" -eq 2 &&
+
+ lines=$(echo "$diff" | grep master | wc -l) &&
+ test "$lines" -eq 1 &&
+
+ lines=$(echo "$diff" | grep branch | wc -l) &&
+ test "$lines" -eq 1 &&
+
+ restore_test_defaults
'
test_done