From 1c6f5b52b7b13bbc6cf404cb5ef9e64fda37655c Mon Sep 17 00:00:00 2001 From: David Aguilar Date: Sat, 9 Jan 2010 20:02:42 -0800 Subject: difftool: Allow specifying unconfigured commands with --extcmd git-difftool requires difftool..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 Signed-off-by: Junio C Hamano --- git-difftool.perl | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'git-difftool.perl') diff --git a/git-difftool.perl b/git-difftool.perl index 8c836e4c76..f8ff245756 100755 --- a/git-difftool.perl +++ b/git-difftool.perl @@ -62,6 +62,10 @@ sub generate_command $skip_next = 1; next; } + if ($arg =~ /^--extcmd=/) { + $ENV{GIT_DIFFTOOL_EXTCMD} = substr($arg, 9); + next; + } if ($arg =~ /^--tool=/) { $ENV{GIT_DIFF_TOOL} = substr($arg, 7); next; -- cgit v1.2.1