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

gitk's back button broken (Refactor per-line part of getblobdiffline and its support)

From
Johannes Sixt <j.sixt@viscovery.net>
Date
Dec 16, 2013, 13:56 UTC
Message-ID
<52AF0688.3070104@viscovery.net>

To reproduce, start gitk in any repository, click a commit, then the "back" button (left-pointing arrow button) or type Alt+Cursor-Left. The error I get is this:

can't use non-numeric string as operand of "!"
can't use non-numeric string as operand of "!"
    while executing
"if {!$ateof} {
	set nlines [expr {[winfo height $ctext]
			  / [font metrics textfont -linespace]}]
	if {[$ctext compare "$target_scrollpos + $nlines ..."
    (procedure "maybe_scroll_ctext" line 5)
    invoked from within
"maybe_scroll_ctext ateof"
    (procedure "blobdiffmaybeseehere" line 6)
    invoked from within
"blobdiffmaybeseehere [eof $bdf]"
    (procedure "getblobdiffline" line 15)
    invoked from within
"getblobdiffline filef5ec60 5de460a2cfdd4acbadd41355a5b34dc69e93b89e"
    ("eval" body line 1)
    invoked from within
"eval $script"
    (procedure "dorunq" line 11)
    invoked from within
"dorunq"
    ("after" script)

After dismissing the error, gitk is still responsive, but does not show diffs anymore.

The error bisects to 5de460a2c (gitk: Refactor per-line part of getblobdiffline and its support) which is already merged downstream into git.

Could you please have a look?
-- Hannes
Next: Johannes Sixt
Message 1 of 3 in “gitk's back button broken (Refactor per-line part of getblobdiffline and its support)”
  1. Johannes SixtDec 16, 2013
  2. gitk: Fix typo in proc blobdiffmaybeseehereJohannes Sixt, Dec 19, 2013
  3. Thomas RastDec 19, 2013

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.