Bug: git log --numstat counts wrong
- From
- Alexander Pepper <pepper@inf.fu-berlin.de>
- Date
- Sep 21, 2011, 09:03 UTC
- Message-ID
- <D3CF0A47-64DA-4EBB-9DCD-D2D714596C50@inf.fu-berlin.de>
Hello there.
I already reported some similar bug with git log --numstat to this mailinglist (see http://www.spinics.net/lists/git/msg163358.html ). Back then empty lines seems to be the issue, but the bug was never fixed.
I found another case, where git log --numstat counts wrong. This time git log --numstat yields bigger numbers than diffstat.
Minimal example: $ git clone https://github.com/voldemort/voldemort.git $ cd voldemort/ $ git show 48a07e7e533f507228e8d1c99d4d48e175e14260 -- src/java/voldemort/server/storage/StorageService.java | diffstat StorageService.java | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) $ git log --numstat 48a07e7e533f507228e8d1c99d4d48e175e14260 [...] 11 10 src/java/voldemort/server/storage/StorageService.java
So git log --numstat claimes that 11 lines where added, where diffstat only counts 10! A closer look inside the StorageService.java reveals no empty lines.
My system: * Mac osx 10.6.8 * git 1.7.5.4 (but also check with a self compiled 1.7.6.1)
Can you confirm that this is a bug? If so, are there plans to fix it in the future?
Greetings from Berlin Alex