Re: [PATCH v2 1/2] range-diff: reorder options lexicographically
- From
Elijah Newren <newren@gmail.com>
- Date
- Aug 28, 2025, 17:12 UTC
- Message-ID
- <CABPp-BGRHajFf5z91CvvKvahpknbt1KraCR3_rOmAjvxz36_Ag@mail.gmail.com>
- In-Reply-To
- <xmqqa53jxyiz.fsf@gitster.g>
On Thu, Aug 28, 2025 at 8:24 AM Junio C Hamano <gitster@pobox.com> wrote:
Show 5 quoted lines
> > "pcasaretto via GitGitGadget" <gitgitgadget@gmail.com> writes: > > > From: pcasaretto <paulo.casaretto@shopify.com> > > Signed-off-by: Paulo Casaretto <paulo.casaretto@shopify.com>
Same issue with name here.
Show 21 quoted lines
> I am not sure if "lexicographic order" fits well in the context of > "git cmd -h" that spews out many many options, shown with related > options together in groups. I find it aggressively annoying to show > left/right-only far apart. A user unfamiliar with the command would > look at the list, find "left-only" sitting in the list alone, and > waste time and break concentration wondering what in the first range > is so special to deserve such an option, until they see "right-only" > further down to realize that they are symmetric. > > I'd rather not to see this "lexicographic" change done, but others > may have better justification (note: "for better organization and > readability" I just disagreed is a good justification) that may make > me change my mind. > > What I would change, if there is something suboptimal in the current > output from "git range-diff -h" that deserves improvement, is the > lack of the grouping header before the options for range-diff > operation (i.e. creation-factor to left/right-only, before the next > "diff output" group begins). > > Thanks.
I do like lexicographic ordering for unrelated options, but I prefer options to be grouped by intent/use first, then by lexicographic ordering. And here, not only are--left-only & --right-only related as Junio points out, to me --diff-merges and --remerge-diff are a similar grouping that belong together. So, my $0.02 is that I'd lean towards calling both changes in the patch a reduction in organization rather than an improvement.