Re: [PATCH] --stat: ensure at least one '-' for deletions, and one '+' for additions

From: Junio C Hamano <junkio@cox.net>
Date: 2006-09-29 12:28:58
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.

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Fri Sep 29 12:29:10 2006

This archive was generated by hypermail 2.1.8 : 2006-09-29 12:31:02 EST