From: Elijah Newren <newren@gmail.com>
To: phillip.wood@dunelm.org.uk
Cc: Elijah Newren via GitGitGadget <gitgitgadget@gmail.com>,
git@vger.kernel.org, Derrick Stolee <derrickstolee@github.com>,
Junio C Hamano <gitster@pobox.com>,
Philippe Blain <levraiphilippeblain@gmail.com>
Subject: Re: [PATCH v2 2/2] rebase: mark --update-refs as requiring the merge backend
Date: Fri, 20 Jan 2023 17:34:36 -0800 [thread overview]
Message-ID: <CABPp-BG8JmXApAsTVxpi2_8DpWi6ix-PhuOG6w=NwR0f=eA7xw@mail.gmail.com> (raw)
In-Reply-To: <bb75c8e1-05d3-1359-e06a-ee013ae677da@dunelm.org.uk>
On Fri, Jan 20, 2023 at 8:46 AM Phillip Wood <phillip.wood123@gmail.com> wrote:
>
> Hi Elijah
>
> Thanks for working on this
>
> On 20/01/2023 04:56, Elijah Newren via GitGitGadget wrote:
> > From: Elijah Newren <newren@gmail.com>
> >
> > --update-refs is built in terms of the sequencer, which requires the
> > merge backend. It was already marked as incompatible with the apply
> > backend in the git-rebase manual, but the code didn't check for this
> > incompatibility and warn the user. Check and warn now.
>
> Strictly speaking we die rather than warn but I don't think that
> warrants a re-roll.
Oh, good catch. I'm re-rolling anyway, so I might as well fix this.
> I just had a quick look to see how easy it would be
> to add the advice Stolee's patch had if the user has set
> rebase.updaterefs but does not pass "--no-update-refs" when using the
> apply backend but it looks a bit fiddly unfortunately as we could die in
> imply_merge() or later on.
Yeah, and it gets even more finicky than that. If the user specifies
_any_ merge-specific options on the command line together with an
apply-specific option, then there's no point bringing up
rebase.updaterefs (or rebase.autosquash). We only want to bring up
those config options if they are the only reasons for getting a
backends-are-incompatible error message.
> Thinking more generally, imply_merge() does a good job of telling the
> user which option is incompatible with "--apply" but if the user passes
> a merge option with "--whitespace=fix" and omits "--apply" then we just
> print a generic message saying "apply options and merge options cannot
> be used together" which isn't terribly helpful to the user (doubly so
> when the merge option come from a config setting).
That's not specific to --whitespace=fix (it also happens with -C, and
in the past happened with other options that used to only work with
the apply backend). In particular, it's whenever both backends are
implied -- in those cases, we don't try to keep track of which options
implied it and thus only provide a very generic error message.
> I've also noticed that "--autosquash" is ignored if we end up using the
> apply backend. That's a separate issue but shares the "this may have
> come from a config setting rather than a command line argument" problem.
Yeah, Stolee also pointed this one out...and --autosquash was missing
the same incompatible-with-apply-options warnings too.
> All in all I'm not sure if it is friendlier to die when the user has
> rebsase.updaterefs set and they try to rebase with "--whitespace=fix" or
> if it is better just to ignore the config in that case. If we can find a
> way to print some help when we die in that case it would be nicer for
> the user.
I think ignoring it would be worse, as I argued over at [1]. But
another thing to keep in mind is that we can eventually make the
question obsolete by deprecating and eventually removing the apply
backend, as suggested by Junio[2]. That would allow us to remove all
the incompatibility checking and simplify the manual.
[1] https://lore.kernel.org/git/CABPp-BHDhpSVpuaubTP=smWaf7FBmpzB-_Frh0Dn5oN+vx0xzw@mail.gmail.com/
[2] See "longer term goal" of
https://lore.kernel.org/git/xmqqa78d2qmk.fsf@gitster-ct.c.googlers.com/
next prev parent reply other threads:[~2023-01-21 1:35 UTC|newest]
Thread overview: 70+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-19 5:36 [PATCH] rebase: mark --update-refs as requiring the merge backend Elijah Newren via GitGitGadget
2023-01-19 21:47 ` Derrick Stolee
2023-01-20 1:54 ` Elijah Newren
2023-01-20 15:27 ` Junio C Hamano
2023-01-20 16:47 ` Elijah Newren
2023-01-20 4:56 ` [PATCH v2 0/2] " Elijah Newren via GitGitGadget
2023-01-20 4:56 ` [PATCH v2 1/2] rebase: remove completely useless -C option Elijah Newren via GitGitGadget
2023-01-20 5:40 ` Eric Sunshine
2023-01-20 6:42 ` Elijah Newren
2023-01-20 9:55 ` Martin Ågren
2023-01-20 15:32 ` Elijah Newren
2023-01-20 12:05 ` Junio C Hamano
2023-01-20 15:31 ` Elijah Newren
2023-01-20 16:15 ` Junio C Hamano
2023-01-21 4:52 ` Elijah Newren
2023-01-22 0:02 ` Junio C Hamano
2023-01-20 4:56 ` [PATCH v2 2/2] rebase: mark --update-refs as requiring the merge backend Elijah Newren via GitGitGadget
2023-01-20 16:46 ` Phillip Wood
2023-01-21 1:34 ` Elijah Newren [this message]
2023-01-21 1:55 ` [PATCH v3 0/7] rebase: fix several code/testing/documentation issues around flag incompatibilities Elijah Newren via GitGitGadget
2023-01-21 1:55 ` [PATCH v3 1/7] rebase: mark --update-refs as requiring the merge backend Elijah Newren via GitGitGadget
2023-01-21 1:55 ` [PATCH v3 2/7] rebase: flag --apply and --merge as incompatible Elijah Newren via GitGitGadget
2023-01-21 1:55 ` [PATCH v3 3/7] rebase: remove --allow-empty-message from incompatible opts Elijah Newren via GitGitGadget
2023-01-21 15:09 ` Phillip Wood
2023-01-21 1:55 ` [PATCH v3 4/7] rebase: fix docs about incompatibilities with --root Elijah Newren via GitGitGadget
2023-01-21 1:55 ` [PATCH v3 5/7] rebase: add coverage of other incompatible options Elijah Newren via GitGitGadget
2023-01-21 15:20 ` Phillip Wood
2023-01-21 19:25 ` Phillip Wood
2023-01-22 5:11 ` Elijah Newren
2023-01-21 1:55 ` [PATCH v3 6/7] rebase: clarify the OPT_CMDMODE incompatibilities Elijah Newren via GitGitGadget
2023-01-21 1:55 ` [PATCH v3 7/7] rebase: fix formatting of rebase --reapply-cherry-picks option in docs Elijah Newren via GitGitGadget
2023-01-21 15:21 ` Phillip Wood
2023-01-22 6:12 ` [PATCH v4 0/9] rebase: fix several code/testing/documentation issues around flag incompatibilities Elijah Newren via GitGitGadget
2023-01-22 6:12 ` [PATCH v4 1/9] rebase: mark --update-refs as requiring the merge backend Elijah Newren via GitGitGadget
2023-01-22 6:12 ` [PATCH v4 2/9] rebase: flag --apply and --merge as incompatible Elijah Newren via GitGitGadget
2023-01-22 6:12 ` [PATCH v4 3/9] rebase: remove --allow-empty-message from incompatible opts Elijah Newren via GitGitGadget
2023-01-22 6:12 ` [PATCH v4 4/9] rebase: fix docs about incompatibilities with --root Elijah Newren via GitGitGadget
2023-01-22 6:12 ` [PATCH v4 5/9] rebase: add coverage of other incompatible options Elijah Newren via GitGitGadget
2023-01-23 20:08 ` Phillip Wood
2023-01-24 2:36 ` Elijah Newren
2023-01-24 10:27 ` Phillip Wood
2023-01-24 13:16 ` Phillip Wood
2023-01-24 14:48 ` Junio C Hamano
2023-01-24 15:41 ` Elijah Newren
2023-01-24 16:48 ` Phillip Wood
2023-01-24 17:12 ` Elijah Newren
2023-01-24 19:21 ` Phillip Wood
2023-01-22 6:12 ` [PATCH v4 6/9] rebase: clarify the OPT_CMDMODE incompatibilities Elijah Newren via GitGitGadget
2023-01-22 6:12 ` [PATCH v4 7/9] rebase: fix formatting of rebase --reapply-cherry-picks option in docs Elijah Newren via GitGitGadget
2023-01-22 6:12 ` [PATCH v4 8/9] rebase: put rebase_options initialization in single place Elijah Newren via GitGitGadget
2023-01-22 6:12 ` [PATCH v4 9/9] rebase: provide better error message for apply options vs. merge config Elijah Newren via GitGitGadget
2023-01-23 15:56 ` [PATCH v4 0/9] rebase: fix several code/testing/documentation issues around flag incompatibilities Derrick Stolee
2023-01-24 2:05 ` Elijah Newren
2023-01-25 4:03 ` [PATCH v5 00/10] " Elijah Newren via GitGitGadget
2023-01-25 4:03 ` [PATCH v5 01/10] rebase: mark --update-refs as requiring the merge backend Elijah Newren via GitGitGadget
2023-01-25 4:03 ` [PATCH v5 02/10] rebase: flag --apply and --merge as incompatible Elijah Newren via GitGitGadget
2023-01-25 4:03 ` [PATCH v5 03/10] rebase: remove --allow-empty-message from incompatible opts Elijah Newren via GitGitGadget
2023-01-25 4:03 ` [PATCH v5 04/10] rebase: fix docs about incompatibilities with --root Elijah Newren via GitGitGadget
2023-01-25 4:03 ` [PATCH v5 05/10] rebase: fix incompatiblity checks for --[no-]reapply-cherry-picks Elijah Newren via GitGitGadget
2023-01-25 14:14 ` Phillip Wood
2023-01-25 4:03 ` [PATCH v5 06/10] rebase: add coverage of other incompatible options Elijah Newren via GitGitGadget
2023-01-25 4:03 ` [PATCH v5 07/10] rebase: clarify the OPT_CMDMODE incompatibilities Elijah Newren via GitGitGadget
2023-01-25 4:03 ` [PATCH v5 08/10] rebase: fix formatting of rebase --reapply-cherry-picks option in docs Elijah Newren via GitGitGadget
2023-01-25 4:03 ` [PATCH v5 09/10] rebase: put rebase_options initialization in single place Elijah Newren via GitGitGadget
2023-01-25 4:03 ` [PATCH v5 10/10] rebase: provide better error message for apply options vs. merge config Elijah Newren via GitGitGadget
2023-01-25 14:17 ` [PATCH v5 00/10] rebase: fix several code/testing/documentation issues around flag incompatibilities Phillip Wood
2023-01-25 16:39 ` Junio C Hamano
2023-01-25 16:48 ` Elijah Newren
2023-02-02 10:29 ` rebase --merge vs --whitespace=fix, was " Johannes Schindelin
2023-02-02 23:48 ` Elijah Newren
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CABPp-BG8JmXApAsTVxpi2_8DpWi6ix-PhuOG6w=NwR0f=eA7xw@mail.gmail.com' \
--to=newren@gmail.com \
--cc=derrickstolee@github.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=gitster@pobox.com \
--cc=levraiphilippeblain@gmail.com \
--cc=phillip.wood@dunelm.org.uk \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).