git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Cc: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>, git@vger.kernel.org
Subject: Re: On-branch topic description support?
Date: Thu, 21 Jul 2022 10:35:51 -0700	[thread overview]
Message-ID: <xmqqk086id1k.fsf@gitster.g> (raw)
In-Reply-To: <20220721162620.f5ffcedkbvvdhhu7@meerkat.local> (Konstantin Ryabitsev's message of "Thu, 21 Jul 2022 12:26:20 -0400")

Konstantin Ryabitsev <konstantin@linuxfoundation.org> writes:

> On Thu, Jul 21, 2022 at 04:53:18PM +0200, Ævar Arnfjörð Bjarmason wrote:
>> I tried now with "git rebase --rebase-merges -i", and it supports it
>> properly, i.e. I could re-arrange it so that it's:
>> 
>>               A---C---B---M topic
>>              / \         /
>>         X---Y   ---------
>>              \
>>               master
>
> This is clever, but it has a hard restriction that nothing happens to A:
>
> - you can't move it so it's B---A---C---M
> - you can't squash A+B
>
> Unless all the tools are taught to properly modify the merge commit.
>
> Or am I not reading this right?

I think the drawing is about a two-commit topic that has B and C

Or the drawing is wrong and M's other parent should have been Y.
IOW, "git merge-base M^1 M^2" is the bottom of the topic (and our
ranges always exclude the bottom end, X..Y does not include X but
does include Y).  "git rev-list M^1...M^2" are the commits on the
topic.

Then you can shuffle A--B--C in whatever way you like with "rebase
-i" or "filter-branch", using "git merge-base M^1 M^2" as the base.

  reply	other threads:[~2022-07-21 17:35 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-20 23:40 On-branch topic description support? Junio C Hamano
2022-07-21  0:52 ` Shaoxuan Yuan
2022-07-21  5:25 ` Elijah Newren
2022-07-21  6:11   ` Junio C Hamano
2022-07-21 14:41   ` Konstantin Ryabitsev
2022-07-21 16:06   ` Philip Oakley
2022-07-21 17:29     ` Junio C Hamano
2022-07-21 14:53 ` Ævar Arnfjörð Bjarmason
2022-07-21 16:26   ` Konstantin Ryabitsev
2022-07-21 17:35     ` Junio C Hamano [this message]
2022-07-21 17:51       ` Ævar Arnfjörð Bjarmason
2022-07-21 17:16   ` Junio C Hamano
2022-07-21 17:49     ` Ævar Arnfjörð Bjarmason
2022-07-21 18:02       ` Junio C Hamano
2022-07-21 18:26         ` Konstantin Ryabitsev
2022-07-21 18:58           ` Ævar Arnfjörð Bjarmason
2022-07-21 19:13           ` Konstantin Ryabitsev
2022-07-21 20:01             ` Junio C Hamano
2022-07-21 20:19               ` Konstantin Ryabitsev
2022-07-21 20:48                 ` Junio C Hamano
2022-07-21 15:05 ` Junio C Hamano
2022-07-21 15:29   ` rsbecker
2022-07-21 15:39     ` Konstantin Ryabitsev
2022-07-21 15:57       ` rsbecker
2022-07-22  3:15 ` Bagas Sanjaya

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=xmqqk086id1k.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=konstantin@linuxfoundation.org \
    /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).