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

Re: git-gui blame dividing by zero

From
Shawn O. Pearce <spearce@spearce.org>
Date
Apr 4, 2007, 15:27 UTC
Message-ID
<20070404152748.GE4628@spearce.org>
In-Reply-To
<200704041621.51390.andyparkins@gmail.com>
Andy Parkins <andyparkins@gmail.com> wrote:
Show 16 quoted lines
>  $ git-gui blame HEAD somefile.cc
> 
> I just get a window that contains:
> 
> divide by zero
> divide by zero
>     while executing
> "expr {100 * $blame_data($w,blame_lines)
> 			/ $blame_data($w,total_lines)}"
>     (procedure "blame_incremental_status" line 4)
>     invoked from within
> "blame_incremental_status $w"
>     (procedure "read_blame_catfile" line 27)
>     invoked from within
> "read_blame_catfile file6 {} HEAD 
> somefile.cc .cm.t .out.loaded_t .out.linenumber_t .out.file_t"

Heh. So we came up with no lines in the file. Weird. What does git-blame produce on the same arguments? What about with the --incremental flag?

I'll dig into git-gui and see what I can do to more gracefully handle this condition, but right now I'm thinking we didn't get any data from git...

-- 
Shawn.
Previous: Andy ParkinsNext: Shawn O. Pearce
Message 2 of 5 in “git-gui blame dividing by zero”
  1. Andy ParkinsApr 4, 2007
  2. Shawn O. PearceApr 4, 2007
  3. Shawn O. PearceApr 4, 2007
  4. Andy ParkinsApr 5, 2007
  5. Andy ParkinsApr 5, 2007

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.