From: Pat Thoyts <patthoyts@users.sourceforge.net>
To: git@vger.kernel.org
Cc: paulus@samba.org
Subject: [PATCH] gitk: handle external diff tool with spaces in the path
Date: 15 Apr 2009 16:54:19 +0100 [thread overview]
Message-ID: <87tz4pnc9g.fsf@users.sourceforge.net> (raw)
This fixes the launching of external diff to handle a diff tool
that has spaces in the path. This patch 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>
---
gitk | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/gitk b/gitk
index edb3ba2..656c2c1 100755
--- a/gitk
+++ b/gitk
@@ -3237,9 +3237,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 {
--
1.6.2.2.1669.g7eaf8
reply other threads:[~2009-04-15 15:55 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87tz4pnc9g.fsf@users.sourceforge.net \
--to=patthoyts@users.sourceforge.net \
--cc=git@vger.kernel.org \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).