aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPat Thoyts <patthoyts@users.sourceforge.net>2009-04-15 16:54:19 +0100
committerPaul Mackerras <paulus@samba.org>2009-04-17 22:47:49 +1000
commitb575b2f1f420bf82557beab0f4ec12e5aa832bea (patch)
tree5e33ed089d319002203448e0a1e7a33c39b9b104
parentc876dbadc2d44386962296f09a060c3ae69e2029 (diff)
downloadgit-b575b2f1f420bf82557beab0f4ec12e5aa832bea.tar.gz
git-b575b2f1f420bf82557beab0f4ec12e5aa832bea.tar.xz
gitk: Handle external diff tool with spaces in the path
This fixes the launching of external diff to handle a diff tool that has spaces in the path. This ensures a correctly formed tcl list is passed to the open command with a single pipe character prefixing the list (as per the tcl manual page for open). The specific fault observed was that selecting WinMerge as the diff tool from the default installed location in Program Files failed to be launched from the context menu. Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net> Signed-off-by: Paul Mackerras <paulus@samba.org>
-rwxr-xr-xgitk5
1 files changed, 2 insertions, 3 deletions
diff --git a/gitk b/gitk
index 045e4abba..488286f6a 100755
--- a/gitk
+++ b/gitk
@@ -3245,9 +3245,8 @@ proc external_diff {} {
set difftofile [external_diff_get_one_file $diffidto $flist_menu_file $diffdir]
if {$difffromfile ne {} && $difftofile ne {}} {
- set cmd [concat | [shellsplit $extdifftool] \
- [list $difffromfile $difftofile]]
- if {[catch {set fl [open $cmd r]} err]} {
+ set cmd [list [shellsplit $extdifftool] $difffromfile $difftofile]
+ if {[catch {set fl [open |$cmd r]} err]} {
file delete -force $diffdir
error_popup "$extdifftool: [mc "command failed:"] $err"
} else {