All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Henrie <alexhenrie24@gmail.com>
To: phillip.wood@dunelm.org.uk
Cc: git@vger.kernel.org, tao@klerks.biz, gitster@pobox.com,
	newren@gmail.com, phillip.wood123@gmail.com,
	Johannes.Schindelin@gmx.de
Subject: Re: [PATCH v2 3/4] rebase: stop accepting --rebase-merges=""
Date: Tue, 21 Feb 2023 18:38:20 -0700	[thread overview]
Message-ID: <CAMMLpeQ9gEKNX5VtGCgLL_Qzk59ZYji57u-SPy-XeSRPuF2NwA@mail.gmail.com> (raw)
In-Reply-To: <852c6efd-49a7-f6f0-dd6a-b28cb0909784@dunelm.org.uk>

On Tue, Feb 21, 2023 at 3:55 AM Phillip Wood <phillip.wood123@gmail.com> wrote:
>
> On 21/02/2023 05:58, Alex Henrie wrote:
> > The unusual syntax --rebase-merges="" (that is, --rebase-merges with an
> > empty string argument) has been an undocumented synonym of
> > --rebase-merges=no-rebase-cousins. Stop accepting that syntax to avoid
> > confusion when a rebase.merges config option is introduced, where
> > rebase.merges="" will be equivalent to not passing --rebase-merges.
>
> I think this is sensible in the context of adding a config option. It is
> a backwards incompatible change though, lets hope no one was relying on
> it.

Since the syntax is bizarre and undocumented, I doubt anyone is
relying on it for anything serious, if anyone uses it at all.

> Is there a particular reason you decided to redo the option parsing
> rather than just calling parse_merges_value() from the existing "if
> (rebase_merges)" block? I don't think it really matters, I'm just curious.

Without a parse_opt_merges callback, how could we know whether the
user passed --no-rebase-merges as opposed to passing nothing at all?
const char *rebase_merges would be NULL in either case. It's an
important distinction to make because --no-rebase-merges overrides
rebase.merges but the absence of a command-line argument does not.

All the same, your comment made me realize that it would probably make
more sense to simply change the default value of --rebase-cousins from
"" to "no-rebase-cousins" in this patch and then add the
parse_opt_merges callback in the next patch when it is actually
needed.

-Alex

  reply	other threads:[~2023-02-22  1:38 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-21  5:58 [PATCH v2 1/4] rebase: document the --no-rebase-merges option Alex Henrie
2023-02-21  5:58 ` [PATCH v2 2/4] rebase: add tests for --no-rebase-merges Alex Henrie
2023-02-21 11:00   ` Phillip Wood
2023-02-22  1:37     ` Alex Henrie
2023-02-22 10:16       ` Phillip Wood
2023-02-23  5:35         ` Alex Henrie
2023-02-21  5:58 ` [PATCH v2 3/4] rebase: stop accepting --rebase-merges="" Alex Henrie
2023-02-21 10:55   ` Phillip Wood
2023-02-22  1:38     ` Alex Henrie [this message]
2023-02-22  1:41       ` Alex Henrie
2023-02-22 10:18       ` Phillip Wood
2023-02-22 23:08         ` Junio C Hamano
2023-02-22 23:33           ` Alex Henrie
2023-02-21  5:58 ` [PATCH v2 4/4] rebase: add a config option for --rebase-merges Alex Henrie
2023-02-21 10:46   ` Phillip Wood
2023-02-22  1:41     ` Alex Henrie
2023-02-21 11:01 ` [PATCH v2 1/4] rebase: document the --no-rebase-merges option Phillip Wood

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMMLpeQ9gEKNX5VtGCgLL_Qzk59ZYji57u-SPy-XeSRPuF2NwA@mail.gmail.com \
    --to=alexhenrie24@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=newren@gmail.com \
    --cc=phillip.wood123@gmail.com \
    --cc=phillip.wood@dunelm.org.uk \
    --cc=tao@klerks.biz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.