@matheusbsbs / matheus-bagliano / commits / d372e21613
Fork 0

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>

Paul Mackerras committed Sep 15, 2007 at 12:08 UTC d372e21613b36d94d595f6627ec603ed11e2fd65
1 file changed +2
gitk
+2
@@ -5920,6 +5920,8 @@ proc mkpatchgo {} {
5920 set newid [$patchtop.tosha1 get]
5921 set fname [$patchtop.fname get]
5922 set cmd [diffcmd [list $oldid $newid] -p]
5923 + # trim off the initial "|"
5924 + set cmd [lrange $cmd 1 end]
5925 lappend cmd >$fname &
5926 if {[catch {eval exec $cmd} err]} {
5927 error_popup "Error creating patch: $err"