Re: [PATCH v2 01/10] command-list.txt: sort with "LC_ALL=C sort"

2 messages, 2 authors, 2021-10-25 · open the first message on its own page

Re: [PATCH v2 01/10] command-list.txt: sort with "LC_ALL=C sort"

From: Junio C Hamano <hidden>
Date: 2021-10-25 18:29:58

Ævar Arnfjörð Bjarmason  [off-list ref] writes:
We should keep these files sorted in the C locale, e.g. in the C
locale the order is:

    git-check-mailmap
    git-check-ref-format
    git-checkout

But under en_US.UTF-8 it's:

    git-check-mailmap
    git-checkout
    git-check-ref-format

In a subsequent commit I'll change generate-cmdlist.sh to use C sort
order, and without this change we'd be led to believe that that change
caused a meaningful change in the output, so let's do this as a
separate step, right now the generate-cmdlist.sh script just uses the
order found in this file.
Hmph, I do not mind sorting this file bytewise like this at all, but
does the justification above still apply to this round?  I had an
impression that we lose the sorting altogether in the end...

Also, I am not sure where that "led to believe" comes from---do we
have a test that checks the output from generate-cmdlist somehow?

Re: [PATCH v2 01/10] command-list.txt: sort with "LC_ALL=C sort"

From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2021-10-25 21:24:00

On Mon, Oct 25 2021, Junio C Hamano wrote:
Ævar Arnfjörð Bjarmason  [off-list ref] writes:
quoted
We should keep these files sorted in the C locale, e.g. in the C
locale the order is:

    git-check-mailmap
    git-check-ref-format
    git-checkout

But under en_US.UTF-8 it's:

    git-check-mailmap
    git-checkout
    git-check-ref-format

In a subsequent commit I'll change generate-cmdlist.sh to use C sort
order, and without this change we'd be led to believe that that change
caused a meaningful change in the output, so let's do this as a
separate step, right now the generate-cmdlist.sh script just uses the
order found in this file.
Hmph, I do not mind sorting this file bytewise like this at all, but
does the justification above still apply to this round?  I had an
impression that we lose the sorting altogether in the end...

Also, I am not sure where that "led to believe" comes from---do we
have a test that checks the output from generate-cmdlist somehow?
We end up unsorting the categories we bitwise-OR together. I.e. the
CAT_* on a line like this:

        { "git-whatchanged", N_("Show logs with difference each commit introduces"), 0 | CAT_ancillaryinterrogators | CAT_complete },

But we'll still sort the actual command list, and spew it out as-is in
some places "git" and "help" output. So having it be unsorted or
shuffled wouldn't be nice.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help