gitk: Fix bug in generating patches

Commit 8f48936391 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>
This commit is contained in:
Paul Mackerras 2007-09-15 12:08:38 +10:00
parent 3e6b893f33
commit d372e21613

2
gitk
View File

@ -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"