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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Johannes Schindelin <Johannes.Schindelin@xxxxxx> 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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]