Re: [PATCH v2 5/7] rebase: drop support for `--preserve-merges`
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Sep 2, 2021, 13:59 UTC
- Message-ID
- <nycvar.QRO.7.76.6.2109021555050.55@tvgsbejvaqbjf.bet>
- In-Reply-To
- <87tuj4v2q5.fsf@evledraar.gmail.com>
Hi Ævar,
On Wed, 1 Sep 2021, Ævar Arnfjörð Bjarmason wrote:
Show 17 quoted lines
>
> On Wed, Sep 01 2021, Johannes Schindelin via GitGitGadget wrote:
>
> > From: Johannes Schindelin <johannes.schindelin@gmx.de>
> >
> > This option was deprecated in favor of `--rebase-merges` some time ago,
> > and now we retire it.
>
> > static int is_merge(struct rebase_options *opts)
> > {
> > - return opts->type == REBASE_MERGE ||
> > - opts->type == REBASE_PRESERVE_MERGES;
> > + return opts->type == REBASE_MERGE;
> > }
>
> This leaves us with a rather pointless is_merge() function and
> nonsensical control flow in parse_opt_merge().Thank you for offering your perspective.
From a readability point of view, I disagree with your assessment. Just because it can be written shorter does not mean that it is clearer. Quite the contrary, if you ask me. And since _I_ am contributing this patch series, I will respectfully disagree and keep the version I find more intuitive.
You could potentially talk me into adding a patch that renames that function to `is_merge_backend()`, but that's as far as I would go. And I am not really certain that that would improve things, either.
Ciao, Dscho