From: apodtele <apodtele@gmail.com>
To: "Junio C Hamano" <junkio@cox.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 1/2] diff --stat: use asymptotic scaling in graph
Date: Fri, 13 Oct 2006 09:56:58 -0400 [thread overview]
Message-ID: <d620685f0610130656u55079a1fkc2c98a82f3aa4a33@mail.gmail.com> (raw)
In-Reply-To: <7vlknlmc9y.fsf@assigned-by-dhcp.cox.net>
On 10/12/06, Junio C Hamano <junkio@cox.net> wrote:
> apodtele <apodtele@gmail.com> writes:
> > Instead of conditionally scaling the stat graph for large changes,
> > always scale it asymptotically: small changes shall appear without any
> > distortions.
> 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
>
> For obvious reasons, the total length of A and B exceeds half of
> C, which looks quite misleading.
>
> A | ++++++++++++--------
> B | ++++++++------------
> C | +++++++++++++++---------------
Before my patch is completely forgotten, let me critique the current
approach. Currently everything is great and beautiful unless one
particular change adds a couple of hundred lines, say, to a man page.
With large changes in play, small changes are squashed to a single
character. Would you argue that this scenario correctly represent
importance of man pages? Would you say, that it's not misleading that
1-, 2-, and 5-liners all look the same as long as a man page is
prominently shown? Moreover, 1-, 2-, and 5- liners may look different
depending on the size of that man page. The current approach is not
invariant; it is, however, normalized as needed. "Normalized" is good,
"as needed" is bad.
With asymptotic scaling, 1-, 2-, and 5- liners are correctly
represented by a correct number of characters, regardless of the size
of that man page. 10- and 20- liners are _slightly_ distorted. I
cannot stress it more: the representation will not depend on the size
of changes in other files! You will be able to tell where truly large
changes happened too! The price for this is that you won't be able to
precisely compare the sizes of added man pages.
It is your choice...
next prev parent reply other threads:[~2006-10-13 13:57 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-12 19:37 [PATCH 1/2] diff --stat: use asymptotic scaling in graph apodtele
2006-10-12 20:16 ` Martin Waitz
2006-10-12 21:37 ` apodtele
2006-10-12 22:20 ` A Large Angry SCM
2006-10-12 22:27 ` Martin Waitz
2006-10-12 22:48 ` A Large Angry SCM
2006-10-12 22:52 ` Johannes Schindelin
2006-10-12 23:12 ` apodtele
2006-10-13 0:39 ` Nicolas Pitre
2006-10-13 13:25 ` apodtele
2006-10-13 13:31 ` Andy Whitcroft
2006-10-12 21:53 ` Junio C Hamano
2006-10-12 22:15 ` A Large Angry SCM
2006-10-12 22:24 ` Junio C Hamano
2006-10-13 13:56 ` apodtele [this message]
2006-10-14 19:06 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d620685f0610130656u55079a1fkc2c98a82f3aa4a33@mail.gmail.com \
--to=apodtele@gmail.com \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).