From: Pavel Roskin <proski@gnu.org>
To: git <git@vger.kernel.org>
Subject: [PATCH] gitk: fix for empty line after Comments
Date: Wed, 02 Nov 2005 15:42:48 -0500 [thread overview]
Message-ID: <1130964168.23026.2.camel@dv> (raw)
git-diff-tree called with one tree-ish shows the commit ID, which should
be ignored by gitk. getblobdiffs() and gettreediffline() recognize and
ignore commit ID now.
Also, the p variable that was used as the other argument git-diff-tree
is no longer used, so it's dropped in both places.
Signed-off-by: Pavel Roskin <proski@gnu.org>
diff --git a/gitk b/gitk
index a9d37d9..e935484 100755
--- a/gitk
+++ b/gitk
@@ -2805,7 +2805,6 @@ 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
fconfigure $gdtf -blocking 0
fileevent $gdtf readable [list gettreediffline $gdtf $ids]
@@ -2830,6 +2829,8 @@ proc gettreediffline {gdtf ids} {
}
}
return
+ } elseif {$n == 40} {
+ return
}
set file [lindex $line 5]
lappend treediff $file
@@ -2840,7 +2841,6 @@ 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]
if {[catch {set bdf [open $cmd r]} err]} {
@@ -2934,7 +2934,7 @@ proc getblobdiffline {bdf ids} {
} elseif {$diffinhdr || $x == "\\"} {
# e.g. "\ No newline at end of file"
$ctext insert end "$line\n" filesep
- } else {
+ } elseif {![regexp {^[0-9a-f]{40}$} $line]} {
# Something else we don't recognize
if {$curdifftag != "Comments"} {
$ctext insert end "\n"
--
Regards,
Pavel Roskin
reply other threads:[~2005-11-02 20:42 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1130964168.23026.2.camel@dv \
--to=proski@gnu.org \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.