From: Junio C Hamano <gitster@pobox.com>
To: Vincent Lefevre <vincent@vinc17.net>
Cc: git@vger.kernel.org
Subject: Re: inconsistent order of --diff-algorithm variants in man pages
Date: Mon, 08 Jun 2026 10:56:33 -0700 [thread overview]
Message-ID: <xmqq5x3sx6em.fsf@gitster.g> (raw)
In-Reply-To: <20260608112656.GI1082778@cventin.lip.ens-lyon.fr> (Vincent Lefevre's message of "Mon, 8 Jun 2026 13:26:56 +0200")
Vincent Lefevre <vincent@vinc17.net> writes:
> In Documentation/diff-algorithm-option.adoc, which is used by the
> git-blame(1) and git-diff(1) man pages:
>
> `--diff-algorithm=(patience|minimal|histogram|myers)`::
> Choose a diff algorithm. The variants are as follows:
> +
> --
> `default`;;
> `myers`;;
> The basic greedy diff algorithm. Currently, this is the default.
> `minimal`;;
> Spend extra time to make sure the smallest possible diff is
> produced.
> `patience`;;
> Use "patience diff" algorithm when generating patches.
> `histogram`;;
> This algorithm extends the patience algorithm to "support
> low-occurrence common elements".
> --
>
> I think that using the same order in the --diff-algorithm line and
> in the description that follows would be better, i.e.
>
> --diff-algorithm=(myers|minimal|patience|histogram)
>
> FYI, the text was added in 07924d4d50e5304fb53eb60aaba8aef31d4c4e5e
> in 2013, but without any explanation on this difference.
I think this is meant to list them as equals without any precedence
or preference order, so it is understandable that nobody paid much
attention. Until now, that is.
I agree that being consistent between these two places makes tons of
sense. I just do not know what the right ordering should be. When
listing a set of equals without any precedence or preference order,
the most easy to see to new readers is alphabetical, except that the
built-in default (myers) is a head above among other equals, so it
does make sense to present it first.
prev parent reply other threads:[~2026-06-08 17:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-08 11:26 inconsistent order of --diff-algorithm variants in man pages Vincent Lefevre
2026-06-08 17:56 ` Junio C Hamano [this message]
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=xmqq5x3sx6em.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=vincent@vinc17.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