author | Jeff King <peff@peff.net> | |
Sat, 17 Apr 2010 17:41:08 +0000 (13:41 -0400) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 17 Apr 2010 18:30:21 +0000 (11:30 -0700) | ||
commit | 0974c117ff4e17e8b6300519cae0fbc67d34adaa | |
tree | 2c3e6e64cd2688725a5b734b069f8b604f83e453 | tree | snapshot |
parent | 902f235378cb2b2f6dd5dd664b9630c95321f0ae | commit | diff |
diff: use large integers for diffstat calculations
The diffstat "added" and "changed" fields generally store
line counts; however, for binary files, they store file
sizes. Since we store and print these values as ints, a
diffstat on a file larger than 2G can show a negative size.
Instead, let's use uintmax_t, which should be at least 64
bits on modern platforms.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The diffstat "added" and "changed" fields generally store
line counts; however, for binary files, they store file
sizes. Since we store and print these values as ints, a
diffstat on a file larger than 2G can show a negative size.
Instead, let's use uintmax_t, which should be at least 64
bits on modern platforms.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff.c | diff | blob | history |