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

Bug report: git log --[num|short]stat sometimes counts lines wrong

From
APAlexander Pepper <pepper@inf.fu-berlin.de>
Date
Aug 12, 2011, 15:21 UTC
Message-ID
<45CC44BC-03FF-4C5F-97B7-7ED03CB68BC2@inf.fu-berlin.de>

Hi there. This is my first contribution to git (if you count a bug report as a contribution) and I'm not really familiar where to report bugs. In the irc channel #git at freenode somebody pointed me to this mailing list.

First of: I'm running git version 1.7.6 on OS X 10.6.8.

Let me describe what I observed. repository: https://github.com/voldemort/voldemort.git The command "git log --numstat c21ad764ea1bae7f7bd83b5e2cb015dcbc44d586" shows for the commit c21ad764 and file '.../readonly/mr/HadoopStoreBuilderReducer.java' 25 lines added and 22 lines removed. But the patch of HadoopStoreBuilderReducer.java that I get with "git show c21ad764ea1bae7f7bd83b5e2cb015dcbc44d586 -- contrib/hadoop-store-builder/src/java/voldemort/store/readonly/mr/HadoopStoreBuilderReducer.java" adds 30 lines and removes 27.

Why does "git log --numstat" drops 5 added lines and 5 removed lines? This also holds true for "git log --stat" and "git log --shortstat".
Is this a bug or am I missing an option to git log or git show?

More commits where I observed this problem on the same repository: 7e00fb6d2cf131dfed59c180f2171952808cc336 src/java/voldemort/client/rebalance/MigratePartitions.java 78ad6f2a6ea327dbae2110f4530a5bd07e5deaac src/java/voldemort/client/rebalance/MigratePartitions.java (same commit on another branch) 7871933f0f0f056e2eeac03a01db1e9cf81f8bda src/java/voldemort/client/protocol/admin/AdminClient.java 2d6f68b09c3bdc23dcf3ae1f91c9285fbd668820 src/java/voldemort/store/readonly/ExternalSorter.java 6fcacee866307ec34eb32b268e2c2b885a949319 build.xml

Greetings from Berlin Alex

Next: Alexander Pepper
Message 1 of 4 in “Bug report: git log --[num|short]stat sometimes counts lines wrong”
  1. Alexander PepperAug 12, 2011
  2. Alexander PepperAug 15, 2011
  3. Carlos Martín NietoAug 15, 2011
  4. Alexander PepperAug 15, 2011

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.