summaryrefslogtreecommitdiff
path: root/gitk
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2007-09-15 02:08:38 (GMT)
committerPaul Mackerras <paulus@samba.org>2007-09-15 02:08:38 (GMT)
commitd372e21613b36d94d595f6627ec603ed11e2fd65 (patch)
tree6041f9c0073777b686f8099fa2bb74ac034d2c70 /gitk
parent3e6b893f33476e7969c7bd5b8914e8bcc62385e3 (diff)
downloadgit-d372e21613b36d94d595f6627ec603ed11e2fd65.zip
git-d372e21613b36d94d595f6627ec603ed11e2fd65.tar.gz
git-d372e21613b36d94d595f6627ec603ed11e2fd65.tar.bz2
gitk: Fix bug in generating patches
Commit 8f4893639129acfc866c71583317090aa2a46eab changed mkpatchgo to use diffcmd rather than constructing the diff command itself. Unfortunately diffcmd returns the command with a "|" as the first element (ready for use with open), but exec won't accept the "|". Thus we need to remove the "|". Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'gitk')
-rwxr-xr-xgitk2
1 files changed, 2 insertions, 0 deletions
diff --git a/gitk b/gitk
index 85d33ab..d5db836 100755
--- a/gitk
+++ b/gitk
@@ -5920,6 +5920,8 @@ proc mkpatchgo {} {
set newid [$patchtop.tosha1 get]
set fname [$patchtop.fname get]
set cmd [diffcmd [list $oldid $newid] -p]
+ # trim off the initial "|"
+ set cmd [lrange $cmd 1 end]
lappend cmd >$fname &
if {[catch {eval exec $cmd} err]} {
error_popup "Error creating patch: $err"