Re: [PATCH 02/25] bundle: alphabetize subcommands better
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Mar 11, 2022, 13:47 UTC
- Message-ID
- <220311.86czisha13.gmgdl@evledraar.gmail.com>
- In-Reply-To
- <a9bcb6065523e2d2307fdc5b7bc92b04aba012e8.1645641063.git.gitgitgadget@gmail.com>
On Wed, Feb 23 2022, Derrick Stolee via GitGitGadget wrote:
Show 9 quoted lines
> From: Derrick Stolee <derrickstolee@github.com> > > The usage strings for the 'git bundle' subcommands are not alphabetical. > This also applies to their inspection within cmd_bundle(). Fix this > ordering before we insert a new subcommand. > > This change does not reorder the cmd_bundle_*() methods to avoid moving > lines that are more likely wanted in a future 'git blame' call. It is > fine that those longer methods are not ordered alphabetically.
If we're moving these around it makes sense to make them use the pattern of macros we use in commit-graph.c. I could have sworn I changed that here already, but obviously not...
Anyway, I think as general UX I thought having these in alphabetical order was a non-goal. Doesn't it make more for these commands in general to list themost frequently used commands first.
In this case though there's pretty much a mapping between that and what happens to be alphabetical order.
But I'd think if e.g. we implemented an "add-ref" or whatever to in-place munge a bundle file to add more data to it such an obscure thing would be better off last, before create/unbundle/list-heads/verify etc.
Jut my 0.02, but for this change I really don't mind it, other than the macro suggestion...