Re: [BUG] gitk: breaks with both version and file limits
- From
Junio C Hamano <junkio@cox.net>
- Date
- Apr 16, 2006, 21:51 UTC
- Message-ID
- <7vslodp4sk.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <20060416115403.GS12638@nowhere.earth>
Yann Dirson <ydirson@altern.org> writes:
> As an example, on a current git tree, the following command triggers > an 'Error: expected boolean value but got ""' dialog when scrolling to > the bottom of the graph, and leaves the bottom of the graph not drawn. > This happens with current master, but not with 1.2.4.
A workaround errorproofing would be to do something like this (note that I do not really speak Tcl).
The real issue is "git-rev-list --boundary ran..ge -- path" does not show boundary. I am not sure if it even worked in the past; will take a look.
-- >8 -- gitk: [lindex $list $no_such_idx] returns "" which is not a valid bool
When asking for commit that is not listed for some reason in commitlisted, gitk barfed because return value from lindex was "" which was not a bool acceptable in ($bool ? A : B) construct.
We are expecting "1" here for listed commits (this comes from getcommitlines), so explicitly check for it.
Signed-off-by: Junio C Hamano <junkio@cox.net> ---
diff --git a/gitk b/gitk index f88c06e..5d2b0cc 100755 --- a/gitk +++ b/gitk @@ -1460,7 +1460,7 @@ proc drawcmittext {id row col rmx} { global linehtag linentag linedtag global mainfont namefont canvxmax - set ofill [expr {[lindex $commitlisted $row]? "blue": "white"}] + set ofill [expr {("1" == [lindex $commitlisted $row]) ? "blue" : "white"}] set x [xc $row $col] set y [yc $row] set orad [expr {$linespc / 3}]