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

gitk: use git-diff-tree --no-commit-id

gitk switched to use git-diff-tree with one argument in gettreediffs and getblobdiffs. git-diff-tree with one argument outputs commit ID in from of the patch. This causes an empty line after "Comments" in the lower right pane. Also, the diff in the lower left pane has the commit ID, which is useless there. This patch makes git use the newly added -no-commit-id option for git-diff-tree to suppress commit ID. It also removes the p variable in both functions, since it has become useless after switching to the one-argument invocation for git-diff-tree. Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: Junio C Hamano <junkio@cox.net>

Pavel Roskin committed Nov 11, 2005 at 10:09 UTC fd913b39101c6ff185e76e459479621c9b475fa1
1 file changed +2 -4
gitk
+2 -4
@@ -2787,8 +2787,7 @@ proc gettreediffs {ids} {
2787 set treepending $ids
2788 set treediff {}
2789 set id [lindex $ids 0]
2790 - set p [lindex $ids 1]
2791 - if [catch {set gdtf [open "|git-diff-tree -r $id" r]}] return
2790 + if [catch {set gdtf [open "|git-diff-tree --no-commit-id -r $id" r]}] return
2791 fconfigure $gdtf -blocking 0
2792 fileevent $gdtf readable [list gettreediffline $gdtf $ids]
2793 }
@@ -2822,9 +2821,8 @@ proc getblobdiffs {ids} {
2821 global difffilestart nextupdate diffinhdr treediffs
2822
2823 set id [lindex $ids 0]
2825 - set p [lindex $ids 1]
2824 set env(GIT_DIFF_OPTS) $diffopts
2827 - set cmd [list | git-diff-tree -r -p -C $id]
2825 + set cmd [list | git-diff-tree --no-commit-id -r -p -C $id]
2826 if {[catch {set bdf [open $cmd r]} err]} {
2827 puts "error getting diffs: $err"
2828 return