diff options
author | David Aguilar <davvid@gmail.com> | 2010-01-09 20:02:42 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-01-09 22:41:30 -0800 |
commit | 1c6f5b52b7b13bbc6cf404cb5ef9e64fda37655c (patch) | |
tree | 99d43713fe0d6097883ef9d254e263bcd3ea34a8 /t/t7800-difftool.sh | |
parent | 61ed71dcff8448b0700ef032aa1f962649306624 (diff) | |
download | git-1c6f5b52b7b13bbc6cf404cb5ef9e64fda37655c.tar.gz |
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/t7800-difftool.sh')
-rwxr-xr-x | t/t7800-difftool.sh | 19 |
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 |