From: Martin Waitz <tali@admingilde.org>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Junio C Hamano <junkio@cox.net>,
git@vger.kernel.org, Jan Engelhardt <jengelh@linux01.gwdg.de>,
Adrian Bunk <bunk@stusta.de>
Subject: Re: [PATCH 3/3] diff --stat: sometimes use non-linear scaling.
Date: Thu, 28 Sep 2006 10:17:57 +0200 [thread overview]
Message-ID: <20060928081757.GF8056@admingilde.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0609270810470.3952@g5.osdl.org>
[-- Attachment #1: Type: text/plain, Size: 890 bytes --]
hoi :)
On Wed, Sep 27, 2006 at 08:12:49AM -0700, Linus Torvalds wrote:
> No _way_ is it correct to show more than three characters if there were
> three lines of changes.
>
> I think "nonlinear" is fine, but this is something that is "superlinear"
> in small changes, and then sublinear in bigger ones (and then apparently
> totally wrong for one-line changes).
>
> It should at least never be superlinear, I believe.
So if we want to keep the logarithmic scale we can do some maths:
Assume we use a formula ala
length = a log(change + b) + c
with three invariants a, b, and c.
We want to scale linearly at first, but want to reach width at
max_change:
0 = a log(b) + c
1 = a log(b + 1) + c
width = a log(max_change + b) + c
But only I have not succeeded in solving these equations, I always stop
at the last invariant :-(
--
Martin Waitz
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2006-09-28 8:18 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-27 2:40 [PATCH 3/3] diff --stat: sometimes use non-linear scaling Junio C Hamano
2006-09-27 3:11 ` David Rientjes
2006-09-27 5:09 ` Junio C Hamano
2006-09-27 5:32 ` David Rientjes
2006-09-27 6:19 ` Junio C Hamano
2006-09-27 6:49 ` David Rientjes
2006-09-27 7:05 ` Junio C Hamano
2006-09-27 7:19 ` David Rientjes
2006-09-27 7:50 ` Johannes Schindelin
[not found] ` <BAYC1-PASMTP024D1DA4730F9DF93F857FAE1A0@CEZ.ICE>
2006-09-27 8:35 ` Johannes Schindelin
2006-09-27 8:41 ` Sean
2006-09-27 8:41 ` Sean
2006-10-06 15:53 ` Petr Baudis
2006-09-27 7:36 ` Johannes Schindelin
2006-09-27 9:16 ` Martin Waitz
2006-09-27 15:12 ` Linus Torvalds
2006-09-28 8:17 ` Martin Waitz [this message]
2006-09-28 9:20 ` Junio C Hamano
2006-09-29 10:56 ` Andreas Ericsson
-- strict thread matches above, loose matches on Subject: below --
2006-10-12 15:04 apodtele
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=20060928081757.GF8056@admingilde.org \
--to=tali@admingilde.org \
--cc=bunk@stusta.de \
--cc=git@vger.kernel.org \
--cc=jengelh@linux01.gwdg.de \
--cc=junkio@cox.net \
--cc=torvalds@osdl.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.