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

A bug in git 1.6.5.2 with git log --stat: shows a negative number as a size

From
HOHeikki Orsila <shdl@zakalwe.fi>
Date
Apr 16, 2010, 13:59 UTC
Message-ID
<20100416135948.GA26918@zakalwe.fi>

I'm running git version 1.6.5.2. git log --stat shows a negative diffstat size for two files that are each 2049MiB in size.

Steps to reproduce:
$ for f in 0 1 ; do dd bs=$((1024*1024)) if=/dev/zero of=$f count=2049 ; done
$ git add 0 1
$ git commit -m "test commit"
$ git log --stat
commit 6afe3d3c889daa92bd79956c4bb733eb5cb408dc
Author: Heikki Orsila <heikki.orsila@iki.fi>
Date:   2010-04-16 16:54:52 +0300
    test commit
 0 |  Bin 0 -> -2146435072 bytes
 1 |  Bin 0 -> -2146435072 bytes
 2 files changed, 0 insertions(+), 0 deletions(-)
-- 
Heikki Orsila
heikki.orsila@iki.fi
http://www.iki.fi/shd
Next: Tomas Carnecky
Message 1 of 5 in “A bug in git 1.6.5.2 with git log --stat: shows a negative number as a size”
  1. Heikki OrsilaApr 16, 2010
  2. Tomas CarneckyApr 16, 2010
  3. diff: use 64-bit integers for diffstat calculationsJeff King, Apr 17, 2010
  4. Junio C HamanoApr 17, 2010
  5. Jeff KingApr 17, 2010

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.