summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0795495)
raw | patch | inline | side by side (parent: 0795495)
author | Sven Verdoolaege <skimo@liacs.nl> | |
Tue, 21 Jun 2005 15:14:30 +0000 (17:14 +0200) | ||
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | |
Tue, 21 Jun 2005 15:41:56 +0000 (08:41 -0700) |
Diffs with only mode changes didn't pass through git-apply --stat.
[ Linus' note: they did for me, on my ppc64, where division by zero just
silently returns zero. Duh. ]
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
[ Linus' note: they did for me, on my ppc64, where division by zero just
silently returns zero. Duh. ]
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
apply.c | patch | blob | history |
index 7d9059ba94aaa4c7f3dc2c8059acb4aca2c3277b..8a3ead6c949ecc0a493f9525580fd90d6bc6ebcd 100644 (file)
--- a/apply.c
+++ b/apply.c
del = patch->lines_deleted;
total = add + del;
- total = (total * max + max_change / 2) / max_change;
- add = (add * max + max_change / 2) / max_change;
- del = total - add;
+ if (max_change > 0) {
+ total = (total * max + max_change / 2) / max_change;
+ add = (add * max + max_change / 2) / max_change;
+ del = total - add;
+ }
printf(" %-*s |%5d %.*s%.*s\n",
len, name, patch->lines_added + patch->lines_deleted,
add, pluses, del, minuses);