{"thread":{"id":"65769","subject":"inconsistent order of --diff-algorithm variants in man pages","startedAt":"2026-06-08T11:26:58Z","lastAt":"2026-06-08T17:56:35Z","messageCount":2,"participants":["Vincent Lefevre","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"544908","messageId":"20260608112656.GI1082778@cventin.lip.ens-lyon.fr","threadId":"65769","inReplyTo":null,"subject":"inconsistent order of --diff-algorithm variants in man pages","fromName":"Vincent Lefevre","fromEmail":"vincent@vinc17.net","sentAt":"2026-06-08T11:26:56Z","receivedAt":"2026-06-08T11:26:58Z","isPatch":false,"body":"In Documentation/diff-algorithm-option.adoc, which is used by the\ngit-blame(1) and git-diff(1) man pages:\n\n`--diff-algorithm=(patience|minimal|histogram|myers)`::\n        Choose a diff algorithm. The variants are as follows:\n+\n--\n   `default`;;\n   `myers`;;\n        The basic greedy diff algorithm. Currently, this is the default.\n   `minimal`;;\n        Spend extra time to make sure the smallest possible diff is\n        produced.\n   `patience`;;\n        Use \"patience diff\" algorithm when generating patches.\n   `histogram`;;\n        This algorithm extends the patience algorithm to \"support\n        low-occurrence common elements\".\n--\n\nI think that using the same order in the --diff-algorithm line and\nin the description that follows would be better, i.e.\n\n  --diff-algorithm=(myers|minimal|patience|histogram)\n\nFYI, the text was added in 07924d4d50e5304fb53eb60aaba8aef31d4c4e5e\nin 2013, but without any explanation on this difference.\n\n-- \nVincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>\n100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>\nWork: CR INRIA - computer arithmetic / Pascaline project (LIP, ENS-Lyon)\n"},{"id":"544954","messageId":"xmqq5x3sx6em.fsf@gitster.g","threadId":"65769","inReplyTo":"20260608112656.GI1082778@cventin.lip.ens-lyon.fr","subject":"Re: inconsistent order of --diff-algorithm variants in man pages","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-06-08T17:56:33Z","receivedAt":"2026-06-08T17:56:35Z","isPatch":false,"body":"Vincent Lefevre <vincent@vinc17.net> writes:\n\n> In Documentation/diff-algorithm-option.adoc, which is used by the\n> git-blame(1) and git-diff(1) man pages:\n>\n> `--diff-algorithm=(patience|minimal|histogram|myers)`::\n>         Choose a diff algorithm. The variants are as follows:\n> +\n> --\n>    `default`;;\n>    `myers`;;\n>         The basic greedy diff algorithm. Currently, this is the default.\n>    `minimal`;;\n>         Spend extra time to make sure the smallest possible diff is\n>         produced.\n>    `patience`;;\n>         Use \"patience diff\" algorithm when generating patches.\n>    `histogram`;;\n>         This algorithm extends the patience algorithm to \"support\n>         low-occurrence common elements\".\n> --\n>\n> I think that using the same order in the --diff-algorithm line and\n> in the description that follows would be better, i.e.\n>\n>   --diff-algorithm=(myers|minimal|patience|histogram)\n>\n> FYI, the text was added in 07924d4d50e5304fb53eb60aaba8aef31d4c4e5e\n> in 2013, but without any explanation on this difference.\n\nI think this is meant to list them as equals without any precedence\nor preference order, so it is understandable that nobody paid much\nattention.  Until now, that is.\n\nI agree that being consistent between these two places makes tons of\nsense.  I just do not know what the right ordering should be.  When\nlisting a set of equals without any precedence or preference order,\nthe most easy to see to new readers is alphabetical, except that the\nbuilt-in default (myers) is a head above among other equals, so it\ndoes make sense to present it first.\n"}]}