Re: [PATCH] range-diff: add --matched-only to skip one-sided commits
- From
Harald Nordgren <haraldnordgren@gmail.com>
- Date
- Sep 11, 2026, 18:48 UTC
- Message-ID
- <CAHwyqnWkEaQHsp5GtYGL9qg-FYA0Ngt_+omdh8jmw4KfqfX6Uw@mail.gmail.com>
- In-Reply-To
- <xmqqik4bbt9c.fsf@gitster.g>
Show 11 quoted lines
> I wonder if the implementation actually can be more like
>
> - give "--hide-left-only" and "--hide-right-only" as synonyms to
> "--right-only" and "--left-only", and deprecate the original;
>
> - allow them to be given together, which will give the new
> behaviour you are introducing, i.e., skip steps without both
> sides from the output;
>
> - give a short-hand synonym, "--matched-only", to truly behave the
> same as giving "--hide-{left,right}-only" together.Seems like a big change, and deprecated options are a pain in the neck because we can never actually remove them.
If we decide to go this way, we might name them "--hide-{left,right}" and just not introduce a condition that makes them incompatible. Then "--matched-only" would be pure syntactic sugar and wouldn't even be 100% necessary to have to achieve this.
Harald