From: phillip.wood123@gmail.com
To: Ivan Shapovalov <intelfx@intelfx.name>,
phillip.wood@dunelm.org.uk, git@vger.kernel.org
Cc: Elijah Newren <newren@gmail.com>,
Derrick Stolee <stolee@gmail.com>,
Junio C Hamano <gitster@pobox.com>,
Alex Henrie <alexhenrie24@gmail.com>
Subject: Re: [PATCH] rebase: add `--update-refs=interactive`
Date: Thu, 13 Feb 2025 09:43:07 +0000 [thread overview]
Message-ID: <8a259585-97f7-4756-a126-17a982da58d7@gmail.com> (raw)
In-Reply-To: <f0fa961084281b1d5948f59c42cf0c87e731d9bc.camel@intelfx.name>
Hi Ivan
On 12/02/2025 17:18, Ivan Shapovalov wrote:
> On 2025-02-12 at 14:26 +0000, Phillip Wood wrote:
>>
>> Thanks for the explanation. So this is about copying a branch and then
>> rebasing the copy without updating the original. A while ago there was a
>> discussion[1] about excluding branches that match HEAD from
>> "--update-refs". Maybe we should revisit that with a view to adding a
>> config setting that excludes copies of the current branch from
>> "--update-refs".
>
> This idea stops working once you have a bunch of interdependent feature
> branches (consider two branches work/myfeatureA and work/myfeatureB,
> with the latter based on the former, with each having two versions as
> described above, and then you rebase work/myfeatureB-v2 from v1 onto v2
> and expect to update work/myfeatureA-v2 but not work/myfeatureA-v1).
> Excluding branches that match HEAD is a very narrow workaround that
> only fixes one particular instance of one particular workflow.
Good point
> I don't understand the opposition, really — in my understanding, an
> ability to restrict update-refs to interactive runs is a significantly
> useful mechanism that does not impose any particular policy. It answers
> the question of "I want git to _suggest_ updating refs by default, but
> only if I have a chance to confirm/reject each particular update".
I'm not opposed, I'm just trying to understand the problem and see if
there are synergies with other issues people have brought to the list in
the past. You've convinced me that supporting
"rebase.updateRefs=interactive" is worthwhile but I do not think we want
to change the commandline interface. I'd much rather reserve the
optional argument to support filtering in the future so that
git rebase --update-refs='*-v2' --update-refs=^not-me-v2
would update all the branches ending in "-v2" except "not-me-v2". We'd
want configure any default patterns separately to whether
"--update-refs" was enabled by default which means we can add "rebase
.updateRefs=interactive" without boxing ourselves into a corner.
>> Maintaining multiple versions of the same branch sounds like a lot of
>> work - whats the advantage over merging a single branch into each release?
>
> Different people, different workflows.
Fair enough, from what Junio said it may actually be less work anyway.
Best Wishes
Phillip
next prev parent reply other threads:[~2025-02-13 9:43 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-10 19:16 [PATCH] rebase: add `--update-refs=interactive` Ivan Shapovalov
2025-02-10 20:22 ` D. Ben Knoble
2025-02-11 11:33 ` Ivan Shapovalov
2025-02-11 16:50 ` Junio C Hamano
2025-02-11 17:36 ` Ivan Shapovalov
2025-02-11 19:28 ` D. Ben Knoble
2025-02-11 19:29 ` D. Ben Knoble
2025-02-11 14:36 ` Phillip Wood
2025-02-11 18:11 ` Ivan Shapovalov
2025-02-12 14:26 ` Phillip Wood
2025-02-12 16:58 ` Junio C Hamano
2025-02-13 9:43 ` Phillip Wood
2025-02-12 17:18 ` Ivan Shapovalov
2025-02-13 9:43 ` phillip.wood123 [this message]
2025-02-13 12:04 ` Ivan Shapovalov
2025-02-19 14:52 ` phillip.wood123
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=8a259585-97f7-4756-a126-17a982da58d7@gmail.com \
--to=phillip.wood123@gmail.com \
--cc=alexhenrie24@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=intelfx@intelfx.name \
--cc=newren@gmail.com \
--cc=phillip.wood@dunelm.org.uk \
--cc=stolee@gmail.com \
/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 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 NNTP newsgroup(s).