Re: [PATCH] --stat: ensure at least one '-' for deletions, and one '+' for additions
- From
Junio C Hamano <junkio@cox.net>
- Date
- Sep 29, 2006, 02:28 UTC
- Message-ID
- <7vd59fquc5.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <Pine.LNX.4.63.0609281942360.14200@wbgn013.biozentrum.uni-wuerzburg.de>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> However, I would argue it's actually an improvement. If you have as many > additions as deletions, there should be an equal number of '-' and '+'.
That's one way to look at it.
Now how would you explain that a file that had 5 adds and 5 deletes gets three pluses and three minuses while another file that had 10 adds and no delets gets seven pluses?
Compute total and add, make del=total-add:
foo | 10 ++++---
bar | 10 +++++++Compute add and del independently:
foo | 10 +++---
bar | 10 +++++++> After all, the integer number of symbols is just an approximation anyway.
Yes, and my guess is that the graph is usually much wider than 7 columns as depicted above, so 3 vs 4 inconsistency in the former is less noticeable than 6 vs 7 inconsistency in the latter to the eye. If we have to make a compromise, I think getting the lines for the files that have the same number of changes to line up at the right end would be more important.
Another way is what I suggested earlier -- if the width is odd, drop one to avoid this problem altogether. That would also be acceptable and probably be more consistent.