git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Add --filedirstat diff option

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 2, 2008, 23:40 UTC
Message-ID
<7vwshuglq1.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20080902115848.GA1252@jolt.modeemi.cs.tut.fi>
Heikki Orsila <shd@modeemi.fi> writes:
Show 20 quoted lines
> On Mon, Sep 01, 2008 at 11:57:46PM -0700, Junio C Hamano wrote:
>> Heikki Orsila <heikki.orsila@iki.fi> writes:
>> 
>> > @@ -2474,7 +2478,10 @@ int diff_opt_parse(struct diff_options *options, const char **av, int ac)
>> >  		options->output_format |= DIFF_FORMAT_DIRSTAT;
>> >  	else if (!strcmp(arg, "--cumulative"))
>> >  		options->output_format |= DIFF_FORMAT_CUMULATIVE;
>> > -	else if (!strcmp(arg, "--check"))
>> > +	else if (opt_arg(arg, 'X', "filedirstat", &options->dirstat_percent)) {
>> > +		options->output_format |= DIFF_FORMAT_DIRSTAT;
>> > +		options->filedirstat = 1;
>> 
>> Why 'X'?  It would never match, confusing to the reader, and risks a
>> sudden change in behaviour when these statements are reordered or somebody
>> mechanically attempts to convert this to parse_options().
>
> This is embarrassing.. I just copied the previous "dirstat" line.. 
> *grin*
>
> Anyway, what about the concept of filedirstat? Is it agreeable?
I am neutral.

I do not think the additional code hurts anybody, so I wouldn't say I do not want to have the patch anywhere near my tree, but on the other hand, personally I do not find the feature as interesting or useful as dirstat.

Maybe there are many others who do find this option useful.  I dunno.
Previous: Heikki OrsilaNext: Junio C Hamano
Message 4 of 12 in “Add --filedirstat diff option”
  1. Add --filedirstat diff optionHeikki Orsila, Sep 1, 2008
  2. Junio C HamanoSep 2, 2008
  3. Heikki OrsilaSep 2, 2008
  4. Junio C HamanoSep 2, 2008
  5. Junio C HamanoSep 2, 2008
  6. Heikki OrsilaSep 3, 2008
  7. Re* [PATCH] Add --filedirstat diff optionJunio C Hamano, Sep 3, 2008
  8. Heikki OrsilaSep 3, 2008
  9. Jeff KingSep 3, 2008
  10. Heikki OrsilaSep 3, 2008
  11. Junio C HamanoSep 3, 2008
  12. Jeff KingSep 3, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.