From: Ian Jackson Date: Tue, 08 Nov 2016 00:52:38 GMT Subject: [PATCH GITK 2/6] gitk: Internal: drawtags: Idempotently reset "ntags" Message-ID: <20161108005241.19888-3-ijackson@chiark.greenend.org.uk> In-Reply-To: <20161108005241.19888-1-ijackson@chiark.greenend.org.uk> The previous code tracked its change to the length of `marks' by updateing the variable `ntags'. This is a bit fragile and cumbersome, and we are going to want to modify `marks' some more in a moment. Instead, simply reset ntags to the length of marks, after we have possibly done any needed abbreviation. No functional change. Signed-off-by: Ian Jackson --- gitk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gitk b/gitk index 42fa41a..31aecda 100755 --- a/gitk +++ b/gitk @@ -6575,9 +6575,10 @@ proc drawtags {id x xt y1} { } else { set marks [list [format "%d tags..." $ntags]] } - set ntags 1 } } + set ntags [llength $marks] + if {[info exists idheads($id)]} { set marks [concat $marks $idheads($id)] set nheads [llength $idheads($id)] -- 2.10.1