From: Michele Ballabio <barra_cuda@katamail.com>
To: git@vger.kernel.org
Cc: "Shawn O. Pearce" <spearce@spearce.org>,
Paul Mackerras <paulus@samba.org>
Subject: [PATCH-resent] gitk: fix in procedure drawcommits
Date: Fri, 19 Oct 2007 15:44:22 +0200 [thread overview]
Message-ID: <200710191544.22228.barra_cuda@katamail.com> (raw)
In-Reply-To: <20071019052823.GI14735@spearce.org>
This patch indroduces a check before unsetting an array element.
Without this, gitk may complain with
can't unset "prevlines(...)": no such element in array
when scrolling happens.
Signed-off-by: Michele Ballabio <barra_cuda@katamail.com>
---
There's an error that seems to occur in gitk only on
mutt's imported repo, but I don't know why. This is
hopefully the right fix.
An example of this error:
can't unset "prevlines(a3b4383d69e0754346578c85ba8ff7c05bd88705)": no such element in array
can't unset "prevlines(a3b4383d69e0754346578c85ba8ff7c05bd88705)": no such element in array
while executing
"unset prevlines($lid)"
(procedure "drawcommits" line 39)
invoked from within
"drawcommits $row $endrow"
(procedure "drawfrac" line 10)
invoked from within
"drawfrac $f0 $f1"
(procedure "scrollcanv" line 3)
invoked from within
"scrollcanv .tf.histframe.csb 0.00672513 0.0087015"
gitk | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/gitk b/gitk
index 300fdce..527b716 100755
--- a/gitk
+++ b/gitk
@@ -3697,7 +3697,9 @@ proc drawcommits {row {endrow {}}} {
if {[info exists lineends($r)]} {
foreach lid $lineends($r) {
- unset prevlines($lid)
+ if {[info exists prevlines($lid)]} {
+ unset prevlines($lid)
+ }
}
}
set rowids [lindex $rowidlist $r]
--
1.5.3
next prev parent reply other threads:[~2007-10-19 13:40 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-19 5:28 gitk patch collection pull request Shawn O. Pearce
2007-10-19 7:25 ` [PATCH resend again] gitk: Do not pick up file names of "copy from" lines Johannes Sixt
2007-10-19 7:32 ` Shawn O. Pearce
2007-10-19 8:05 ` Johannes Sixt
2007-10-19 8:14 ` Shawn O. Pearce
2007-10-19 11:05 ` gitk patch collection pull request Paul Mackerras
2007-10-20 3:10 ` Shawn O. Pearce
2007-10-20 11:12 ` Jonathan del Strother
2007-10-20 11:46 ` Paul Mackerras
2007-10-20 13:00 ` Jonathan del Strother
2007-10-20 15:32 ` Jan Hudec
2007-10-19 13:44 ` Michele Ballabio [this message]
2007-10-20 10:16 ` [PATCH-resent] gitk: fix in procedure drawcommits Paul Mackerras
2007-10-20 16:02 ` Michele Ballabio
2007-10-20 18:35 ` Jan Hudec
2007-10-21 3:01 ` Paul Mackerras
2007-10-21 12:12 ` Rocco Rutte
2007-10-19 19:31 ` gitk patch collection pull request Linus Torvalds
2007-10-20 4:45 ` Paul Mackerras
2007-10-20 4:51 ` Linus Torvalds
2007-10-23 0:20 ` Paul Mackerras
2007-10-23 19:17 ` Linus Torvalds
2007-10-23 23:37 ` Paul Mackerras
2007-10-23 23:51 ` Linus Torvalds
2007-10-24 0:17 ` Paul Mackerras
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=200710191544.22228.barra_cuda@katamail.com \
--to=barra_cuda@katamail.com \
--cc=git@vger.kernel.org \
--cc=paulus@samba.org \
--cc=spearce@spearce.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 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).