From: Linus Torvalds <torvalds@linux-foundation.org>
To: Johan Herland <johan@herland.net>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: [RFC/PATCH 5/3] Alternative --dirstat implementation, based on diffstat analysis
Date: Tue, 12 Apr 2011 07:46:47 -0700 [thread overview]
Message-ID: <BANLkTim9U4cOnV+5=Mp-2g_M6+JOiM5e7A@mail.gmail.com> (raw)
In-Reply-To: <201104121126.49881.johan@herland.net>
On Tue, Apr 12, 2011 at 2:26 AM, Johan Herland <johan@herland.net> wrote:
> This patch adds an alternative implementation of show_dirstat(), called
> show_dirstat_based_on_diffstat(), which uses the more expensive diffstat
> analysis (as opposed to --dirstat's own (inexpensive) analysis) to derive
> the numbers from which the --dirstat output is computed.
>
> The alternative implementation is controlled by a new config variable called
> diff.dirstatBasedOnDiffstat.
So I don't hate the idea, but I do hate the "use a config option"
part. Or rather, I hate the fact that it's the _only_ way to do it
(and the particular config name you chose).
I'd much rather have a command line option for the two cases, and then
have the config file part be a way to perhaps set the default value.
Something like "--dirstat=exact", and then without the explicit
setting you might fall back on the config file.
(One reason I'd like that is that I think the "--cumulative" option
was a mistake. Again, it _should_ have been another option to
"--dirstat", rather than a stand-alone option that makes no sense on
its own)
So in a better world, I think we should be able to write
--dirstat=[non]exact,[non]cumulative,1
to say exactly what kind of dirstat we actually want. And the config
options would also match, iow
[dirstat]
exact = true
cumulative = true
percentage = 1
rather than the cumbersome name you chose that is based on an
implementation issue rather than a user interface issue (I think
config options should talk about the user experience more than about
how it was implemented, so "diff.dirstatbasedondiffstat: is not
wonderful)
Wouldn't that be nicer? Can I sucker you into parsing something like that?
If you do this, another thing I've occasionally wanted to see was a
percentage that allows fractional percentages. We show the results in
permille, after all, it should be possible to ask for cut-offs at the
same precision, ie "1.5%".
Linus "can I find a sucker to implement this" Torvalds
next prev parent reply other threads:[~2011-04-12 14:47 UTC|newest]
Thread overview: 91+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-07 13:49 BUG? in --dirstat when rearranging lines in a file Johan Herland
2011-04-07 14:56 ` Linus Torvalds
2011-04-07 22:43 ` Junio C Hamano
2011-04-07 22:59 ` Linus Torvalds
2011-04-08 14:46 ` Johan Herland
2011-04-08 14:48 ` [PATCH 1/3] --dirstat: Document shortcomings compared to --stat or regular diff Johan Herland
2011-04-08 19:50 ` Junio C Hamano
2011-04-08 14:50 ` [PATCH 2/3] --dirstat-by-file: Make it faster and more correct Johan Herland
2011-04-08 14:55 ` [RFC/PATCH 3/3] Teach --dirstat to not completely ignore rearranged lines Johan Herland
2011-04-08 15:04 ` BUG? in --dirstat when rearranging lines in a file Linus Torvalds
2011-04-08 19:56 ` Junio C Hamano
2011-04-10 22:48 ` [PATCHv2 0/3] --dirstat fixes Johan Herland
2011-04-10 22:48 ` [PATCHv2 1/3] --dirstat: Describe non-obvious differences relative to --stat or regular diff Johan Herland
2011-04-10 22:48 ` [PATCHv2 2/3] --dirstat-by-file: Make it faster and more correct Johan Herland
2011-04-11 18:14 ` Junio C Hamano
2011-04-10 22:48 ` [PATCHv2 3/3] Teach --dirstat to not completely ignore rearranged lines within a file Johan Herland
2011-04-11 21:38 ` Junio C Hamano
2011-04-11 21:56 ` Johan Herland
2011-04-11 22:08 ` Junio C Hamano
2011-04-12 9:22 ` Johan Herland
2011-04-12 9:24 ` [PATCH 4/3] --dirstat: In case of renames, use target filename instead of source filename Johan Herland
2011-04-12 14:59 ` Linus Torvalds
2011-04-12 9:26 ` [RFC/PATCH 5/3] Alternative --dirstat implementation, based on diffstat analysis Johan Herland
2011-04-12 14:46 ` Linus Torvalds [this message]
2011-04-12 15:08 ` Linus Torvalds
2011-04-12 22:03 ` Johan Herland
2011-04-12 22:12 ` Linus Torvalds
2011-04-12 22:22 ` Junio C Hamano
2011-04-26 0:01 ` [PATCH 0/6] --dirstat fixes, part 2 Johan Herland
2011-04-26 0:01 ` [PATCH 1/6] Add several testcases for --dirstat and friends Johan Herland
2011-04-26 0:01 ` [PATCH 2/6] Make --dirstat=0 output directories that contribute < 0.1% of changes Johan Herland
2011-04-26 0:01 ` [PATCH 3/6] Refactor --dirstat parsing; deprecate --cumulative and --dirstat-by-file Johan Herland
2011-04-26 16:36 ` Junio C Hamano
2011-04-27 2:02 ` Johan Herland
2011-04-27 4:53 ` Junio C Hamano
2011-04-27 20:51 ` Junio C Hamano
2011-04-27 21:01 ` Junio C Hamano
2011-04-26 0:01 ` [PATCH 4/6] Add config variable for specifying default --dirstat behavior Johan Herland
2011-04-26 16:43 ` Junio C Hamano
2011-04-27 2:02 ` Johan Herland
2011-04-26 0:01 ` [PATCH 5/6] Use floating point for --dirstat percentages Johan Herland
2011-04-26 16:52 ` Junio C Hamano
2011-04-27 2:02 ` Johan Herland
2011-04-27 4:42 ` Junio C Hamano
2011-04-27 4:53 ` Linus Torvalds
2011-04-27 5:20 ` Junio C Hamano
2011-04-26 0:01 ` [PATCH 6/6] New --dirstat=lines mode, doing dirstat analysis based on diffstat Johan Herland
2011-04-26 16:59 ` Junio C Hamano
2011-04-27 2:02 ` Johan Herland
2011-04-26 0:15 ` [PATCH 0/6] --dirstat fixes, part 2 Linus Torvalds
2011-04-27 2:12 ` [PATCHv2 " Johan Herland
2011-04-27 2:12 ` [PATCHv2 1/6] Add several testcases for --dirstat and friends Johan Herland
2011-04-27 2:12 ` [PATCHv2 2/6] Make --dirstat=0 output directories that contribute < 0.1% of changes Johan Herland
2011-04-27 2:12 ` [PATCHv2 3/6] Refactor --dirstat parsing; deprecate --cumulative and --dirstat-by-file Johan Herland
2011-04-27 2:12 ` [PATCHv2 4/6] Add config variable for specifying default --dirstat behavior Johan Herland
2011-04-27 2:12 ` [PATCHv2 5/6] Use floating point for --dirstat percentages Johan Herland
2011-04-27 2:45 ` Linus Torvalds
2011-04-27 2:12 ` [PATCHv2 6/6] New --dirstat=lines mode, doing dirstat analysis based on diffstat Johan Herland
2011-04-27 8:24 ` [PATCHv3 0/6] --dirstat fixes, part 2 Johan Herland
2011-04-27 8:24 ` [PATCHv3 1/6] Add several testcases for --dirstat and friends Johan Herland
2011-04-27 8:24 ` [PATCHv3 2/6] Make --dirstat=0 output directories that contribute < 0.1% of changes Johan Herland
2011-04-27 8:24 ` [PATCHv3 3/6] Refactor --dirstat parsing; deprecate --cumulative and --dirstat-by-file Johan Herland
2011-04-27 8:24 ` [PATCHv3 4/6] Add config variable for specifying default --dirstat behavior Johan Herland
2011-04-27 8:24 ` [PATCHv3 5/6] Allow specifying --dirstat cut-off percentage as a floating point number Johan Herland
2011-04-27 8:37 ` Linus Torvalds
2011-04-27 10:29 ` [PATCHv4 " Johan Herland
2011-04-27 8:24 ` [PATCHv3 6/6] New --dirstat=lines mode, doing dirstat analysis based on diffstat Johan Herland
2011-04-28 1:17 ` [PATCHv5 0/7] --dirstat fixes, part 2 Johan Herland
2011-04-28 1:17 ` [PATCHv5 1/7] Add several testcases for --dirstat and friends Johan Herland
2011-04-28 1:17 ` [PATCHv5 2/7] Make --dirstat=0 output directories that contribute < 0.1% of changes Johan Herland
2011-04-28 1:17 ` [PATCHv5 3/7] Refactor --dirstat parsing; deprecate --cumulative and --dirstat-by-file Johan Herland
2011-04-28 1:17 ` [PATCHv5 4/7] Add config variable for specifying default --dirstat behavior Johan Herland
2011-04-28 1:17 ` [PATCHv5 5/7] Allow specifying --dirstat cut-off percentage as a floating point number Johan Herland
2011-04-28 1:17 ` [PATCHv5 6/7] New --dirstat=lines mode, doing dirstat analysis based on diffstat Johan Herland
2011-04-28 1:17 ` [PATCHv5 7/7] Improve error handling when parsing dirstat parameters Johan Herland
2011-04-28 18:41 ` Junio C Hamano
2011-04-28 19:20 ` Junio C Hamano
2011-04-28 23:16 ` Johan Herland
2011-04-28 23:13 ` Johan Herland
2011-04-29 4:06 ` Junio C Hamano
2011-04-29 9:36 ` [PATCHv6 0/8] --dirstat fixes, part 2 Johan Herland
2011-04-29 9:36 ` [PATCHv6 1/8] Add several testcases for --dirstat and friends Johan Herland
2011-04-29 9:36 ` [PATCHv6 2/8] Make --dirstat=0 output directories that contribute < 0.1% of changes Johan Herland
2011-04-29 9:36 ` [PATCHv6 3/8] Refactor --dirstat parsing; deprecate --cumulative and --dirstat-by-file Johan Herland
2011-04-29 9:36 ` [PATCHv6 4/8] Add config variable for specifying default --dirstat behavior Johan Herland
2011-04-29 9:36 ` [PATCHv6 5/8] Allow specifying --dirstat cut-off percentage as a floating point number Johan Herland
2011-04-29 9:36 ` [PATCHv6 6/8] New --dirstat=lines mode, doing dirstat analysis based on diffstat Johan Herland
2011-04-29 9:36 ` [PATCHv6 7/8] Improve error handling when parsing dirstat parameters Johan Herland
2011-04-29 9:36 ` [PATCHv6 8/8] Mark dirstat error messages for translation Johan Herland
2011-04-12 18:34 ` [RFC/PATCH 5/3] Alternative --dirstat implementation, based on diffstat analysis Junio C Hamano
2011-04-10 23:17 ` [PATCHv2 0/3] --dirstat fixes Linus Torvalds
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='BANLkTim9U4cOnV+5=Mp-2g_M6+JOiM5e7A@mail.gmail.com' \
--to=torvalds@linux-foundation.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=johan@herland.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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).