{"thread":{"id":"2456","subject":"[PATCH] gitk: use git-diff-tree --no-commit-id","startedAt":"2005-11-11T15:09:12Z","lastAt":"2005-11-11T15:09:12Z","messageCount":1,"participants":["Pavel Roskin"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"11595","messageId":"1131721752.1284.7.camel@dv","threadId":"2456","inReplyTo":null,"subject":"[PATCH] gitk: use git-diff-tree --no-commit-id","fromName":"Pavel Roskin","fromEmail":"proski@gnu.org","sentAt":"2005-11-11T15:09:12Z","receivedAt":"2005-11-11T15:09:12Z","isPatch":true,"sender":{"key":"proski@gnu.org","avatar":null},"body":"gitk switched to use git-diff-tree with one argument in gettreediffs and\ngetblobdiffs.  git-diff-tree with one argument outputs commit ID in from\nof the patch.  This causes an empty line after \"Comments\" in the lower\nright pane.  Also, the diff in the lower left pane has the commit ID,\nwhich is useless there.\n\nThis patch makes git use the newly added -no-commit-id option for\ngit-diff-tree to suppress commit ID.  It also removes the p variable in\nboth functions, since it has become useless after switching to the\none-argument invocation for git-diff-tree.\n\nSigned-off-by: Pavel Roskin <proski@gnu.org>\n\ndiff --git a/gitk b/gitk\nindex a9d37d9..6d47139 100755\n--- a/gitk\n+++ b/gitk\n@@ -2805,8 +2805,7 @@ proc gettreediffs {ids} {\n     set treepending $ids\n     set treediff {}\n     set id [lindex $ids 0]\n-    set p [lindex $ids 1]\n-    if [catch {set gdtf [open \"|git-diff-tree -r $id\" r]}] return\n+    if [catch {set gdtf [open \"|git-diff-tree --no-commit-id -r $id\" r]}] return\n     fconfigure $gdtf -blocking 0\n     fileevent $gdtf readable [list gettreediffline $gdtf $ids]\n }\n@@ -2840,9 +2839,8 @@ proc getblobdiffs {ids} {\n     global difffilestart nextupdate diffinhdr treediffs\n \n     set id [lindex $ids 0]\n-    set p [lindex $ids 1]\n     set env(GIT_DIFF_OPTS) $diffopts\n-    set cmd [list | git-diff-tree -r -p -C $id]\n+    set cmd [list | git-diff-tree --no-commit-id -r -p -C $id]\n     if {[catch {set bdf [open $cmd r]} err]} {\n \tputs \"error getting diffs: $err\"\n \treturn\n\n\n\n-- \nRegards,\nPavel Roskin\n"}]}