Re: [PATCH 1/2] diff --stat: use asymptotic scaling in graph

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

 



apodtele <apodtele@xxxxxxxxx> writes:

> Instead of conditionally scaling the stat graph for large changes,
> always scale it asymptotically: small changes shall appear without any
> distortions.
>
> Signed-off-by: Alexei Podtelezhnikov

Missing e-mail address on S-o-b line.  If your mail From: line
does not say who you are, please add an extra From: line in the
body, like this:

	From: Alexei Podtelezhnikov <apodtele@xxxxxxxxx>
        Subject: [PATCH 1/2] diff --stat: ...

        Instead of ...

	Signed-off-by: Alexei Podtelezhnikov <apodtele@xxxxxxxxx>


I am not sure if any non-linear scaling is worth pursuing.
Suppose your change set has three files modified:

	A	adds 20 lines, deletes 10 lines
        B	adds 10 lines, deletes 20 lines
        C	adds 30 lines, deletes 30 lines

When drawing into a specified width that leaves 20-column for
the graph part, what would we see?  What would we see if the
graph part is 21-column wide?  59-column wide?  80-column wide?

For obvious reasons, the total length of A and B exceeds half of
C, which looks quite misleading.

         A | ++++++++++++--------
         B | ++++++++------------
         C | +++++++++++++++---------------

We could align things in the middle, like this, though:

         A |    ++++++++++++--------
         B |        ++++++++------------
         C | +++++++++++++++---------------


-
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]