From d372e21613b36d94d595f6627ec603ed11e2fd65 Mon Sep 17 00:00:00 2001 From: Paul Mackerras Date: Sat, 15 Sep 2007 12:08:38 +1000 Subject: [PATCH] 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 --- gitk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gitk b/gitk index 85d33abf4a..d5db836528 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" -- 2.11.4.GIT