git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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}]
Previous: Yann DirsonNext: Paul Mackerras
Message 2 of 4 in “[BUG] gitk: breaks with both version and file limits”
  1. Yann DirsonApr 16, 2006
  2. Junio C HamanoApr 16, 2006
  3. Paul MackerrasApr 17, 2006
  4. rev-list --boundary: show boundary commits even when limited otherwise.Junio C Hamano, Apr 17, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.