git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] gitk: use git-diff-tree --no-commit-id
@ 2005-11-11 15:09 Pavel Roskin
  0 siblings, 0 replies; only message in thread
From: Pavel Roskin @ 2005-11-11 15:09 UTC (permalink / raw)
  To: Paul Mackerras, git

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>

diff --git a/gitk b/gitk
index a9d37d9..6d47139 100755
--- a/gitk
+++ b/gitk
@@ -2805,8 +2805,7 @@ proc gettreediffs {ids} {
     set treepending $ids
     set treediff {}
     set id [lindex $ids 0]
-    set p [lindex $ids 1]
-    if [catch {set gdtf [open "|git-diff-tree -r $id" r]}] return
+    if [catch {set gdtf [open "|git-diff-tree --no-commit-id -r $id" r]}] return
     fconfigure $gdtf -blocking 0
     fileevent $gdtf readable [list gettreediffline $gdtf $ids]
 }
@@ -2840,9 +2839,8 @@ proc getblobdiffs {ids} {
     global difffilestart nextupdate diffinhdr treediffs
 
     set id [lindex $ids 0]
-    set p [lindex $ids 1]
     set env(GIT_DIFF_OPTS) $diffopts
-    set cmd [list | git-diff-tree -r -p -C $id]
+    set cmd [list | git-diff-tree --no-commit-id -r -p -C $id]
     if {[catch {set bdf [open $cmd r]} err]} {
 	puts "error getting diffs: $err"
 	return



-- 
Regards,
Pavel Roskin

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2005-11-11 15:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-11 15:09 [PATCH] gitk: use git-diff-tree --no-commit-id Pavel Roskin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).