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

Re: [PATCH] diff: resurrect XDF_NEED_MINIMAL with --minimal

From
Tay Ray Chuan <rctay89@gmail.com>
Date
Oct 3, 2011, 13:04 UTC
Message-ID
<CALUzUxrfUF5sbgSv3dwkBC6cggV3mqRDDMrpP-zX_86xdt6ZYA@mail.gmail.com>
In-Reply-To
<20111003123843.GA15493@elie>
On Mon, Oct 3, 2011 at 8:38 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:
Thanks for the Cc, Johnathan.
Show 8 quoted lines
> Junio C Hamano wrote:
>
>>  * This together with René's c5aa906 (Revert removal of multi-match
>>    discard heuristic in 27af01, 2011-09-25) on top of v1.7.7 seems to give
>>    identical diff output as v1.7.1 (e.g. "git diff-tree -p v2.6.39 v3.0"
>>    in the kernel repository, with "--minimal").
>
> Very neat.

Interesting. Clearly there is more than just the multi-match discard heuristic in (xdl_clean_mmatch() and xdl_cleanup_records()).

Show 16 quoted lines
> diff --git i/diff.c w/diff.c
> index fcc00780..2282f86f 100644
> --- i/diff.c
> +++ w/diff.c
> @@ -3393,6 +3393,10 @@ int diff_opt_parse(struct diff_options *options, const char **av, int ac)
>                DIFF_XDL_SET(options, IGNORE_WHITESPACE_AT_EOL);
>        else if (!strcmp(arg, "--patience"))
>                DIFF_XDL_SET(options, PATIENCE_DIFF);
> +       else if (!strcmp(arg, "--minimal"))
> +               DIFF_XDL_SET(options, NEED_MINIMAL);
> +       else if (!strcmp(arg, "--no-minimal"))
> +               DIFF_XDL_CLR(options, NEED_MINIMAL);
>        else if (!strcmp(arg, "--histogram"))
>                DIFF_XDL_SET(options, HISTOGRAM_DIFF);
>
>

That's an improvement, but it would be even better if it was placed above the --<strategy> options, instead of being placed between them.

-- 
Cheers,
Ray Chuan
Previous: Jonathan Nieder
Message 3 of 3 in “diff: resurrect XDF_NEED_MINIMAL with --minimal”
  1. diff: resurrect XDF_NEED_MINIMAL with --minimalJunio C Hamano, Oct 2, 2011
  2. Jonathan NiederOct 3, 2011
  3. Tay Ray ChuanOct 3, 2011

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.