summaryrefslogtreecommitdiff
path: root/builtin/clone.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-02-14 21:49:11 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-02-14 22:21:49 (GMT)
commit2eeeef24ff5a6538f41f5fe44f3a4e7f6e36e7e5 (patch)
tree2ce18274e0771cebfc3970381c6b21ab2dc5b75a /builtin/clone.c
parentd0482e88a735787f7bb33ef4783be0e7f6a70946 (diff)
downloadgit-2eeeef24ff5a6538f41f5fe44f3a4e7f6e36e7e5.zip
git-2eeeef24ff5a6538f41f5fe44f3a4e7f6e36e7e5.tar.gz
git-2eeeef24ff5a6538f41f5fe44f3a4e7f6e36e7e5.tar.bz2
diff --stat: show bars of same length for paths with same amount of changes
When commit 3ed74e6 (diff --stat: ensure at least one '-' for deletions, and one '+' for additions, 2006-09-28) improved the output for files with tiny modifications, we accidentally broke the logic to ensure that two equal sized changes are shown with the bars of the same length, even when rounding errors exist. Compute the length of the graph bars, using the same "non-zero changes is shown with at least one column" scaling logic, but by scaling the sum of additions and deletions to come up with the total length of the bar (this ensures that two equal sized changes result in bars of the same length), and then scaling the smaller of the additions or deletions. The other side is computed as the difference between the two. This makes the apportioning between additions and deletions less accurate due to rounding errors, but it is much less noticeable than two files with the same amount of change showing bars of different length. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/clone.c')
0 files changed, 0 insertions, 0 deletions