From: "Kristoffer Haugsbakk" <kristofferhaugsbakk@fastmail•com>
To: "Junio C Hamano" <gitster@pobox•com>
Cc: git@vger•kernel.org,
"Kristoffer Haugsbakk" <code@khaugsbakk•name>,
"Christian Couder" <christian.couder@gmail•com>,
"Elijah Newren" <newren@gmail•com>,
"Siddharth Asthana" <siddharthasthana31@gmail•com>
Subject: Re: [PATCH 0/3] doc: replay: improvements like "mention no output on conflicts"
Date: Tue, 09 Dec 2025 19:05:02 +0100 [thread overview]
Message-ID: <753daaa4-e675-4d28-9c13-4f5ede0f3b47@app.fastmail.com> (raw)
In-Reply-To: <xmqqms3tkux8.fsf@gitster.g>
On Mon, Dec 8, 2025, at 13:41, Junio C Hamano wrote:
>>>[snip]
>>>
>>> All looked sensible.
>>>
>>> The second one looked a bit sketchy, but that was the phrase used by
>>> the log message for c4611130 (replay: add --contained to rebase
>>> contained branches, 2023-11-24).
>>
>> How should `--contained` be documented?
>
> The text you added uses exactly the phrase used by the log message,
> so the author of the feature apparently felt it is good enough ;-).
>
> It just felt that "contained in <revision-range>" is understandable
> enough.
“is [not]” presumably.
I read it as this with pseudo-decoration.
abcde (refs/heads/topic2)
12345
56789 (refs/heads/topic1)
0abcd
`topic1` and `topic2` are contained and will be updated.
> For example, I am unsure if somebody who read the document can
> accurately answer the following question:
>
> If you forked 7-commit series from v1.0, merged the early 3
> commits to the 'master' branch, and merged the rest to the
> 'next' branch, is that branch contained in 'master..next'?
I tested that with, let’s say, `topic-1` merged to a `test-master` (and
`topic-2` merged to a `test-next).
`git log test-master..test-next` was as expected (no `topic-1`). Replaying onto
one commit on top of `test-next`:[1]
$ git replay --contained --onto=test-target test-master..test-next
<exit code 1>
I guess the “duplicates” (patch-id) cause this?
> Or it is not because the bottommost 3 commits are not part of
> master..next? If it is the former, is it because the topmost
> commit (i.e., the commit pointed at by the branch reference) is
> the only thing that counts, and it indeed is master..next?
It’s a somewhat complex case compared to what I think is the usual one:
a non-merge range of commits without any patch-id-equivalents on the
target (fingers crossed). And the setup without merges: two topic
branches in the range gives the output I expect:
git replay --contained --onto=target2 <range>
update <top/second>
update <bottom/first>
I think the original phrasing is understandable. But we could add
an example.
For example, if the range contains five commits where a branch
points to the newest commit and another branch points to the third
commit ...
And should the description in the source (replay.c) be updated as well?
This goes for Phillip’s point about “Requires --onto” as well.
† 1: By the way: me mistyping `--onto=<branch>` where `<branch>` doesn’t
exist causes this error:
fatal: Replaying down to root commit is not supported yet!
next prev parent reply other threads:[~2025-12-09 18:05 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-07 17:55 [PATCH 0/3] doc: replay: improvements like "mention no output on conflicts" kristofferhaugsbakk
2025-12-07 17:55 ` [PATCH 1/3] doc: replay: mention no output on conflicts kristofferhaugsbakk
2025-12-07 17:55 ` [PATCH 2/3] doc: replay: document --contained kristofferhaugsbakk
2025-12-07 17:55 ` [PATCH 3/3] doc: replay: link section using markup kristofferhaugsbakk
2025-12-07 21:58 ` [PATCH 0/3] doc: replay: improvements like "mention no output on conflicts" Junio C Hamano
2025-12-08 7:28 ` Kristoffer Haugsbakk
2025-12-08 12:41 ` Junio C Hamano
2025-12-09 18:05 ` Kristoffer Haugsbakk [this message]
2025-12-09 23:02 ` Junio C Hamano
2025-12-08 14:29 ` Toon Claes
2025-12-08 14:35 ` Kristoffer Haugsbakk
2025-12-08 16:00 ` Phillip Wood
2025-12-09 18:03 ` Kristoffer Haugsbakk
2025-12-09 22:57 ` Junio C Hamano
2025-12-10 9:51 ` Phillip Wood
2025-12-10 11:56 ` Junio C Hamano
2025-12-10 12:04 ` Kristoffer Haugsbakk
2025-12-10 14:14 ` Phillip Wood
2025-12-10 15:40 ` Elijah Newren
2025-12-13 13:46 ` [PATCH v2 " kristofferhaugsbakk
2025-12-13 13:46 ` [PATCH v2 1/3] doc: replay: mention no output on conflicts kristofferhaugsbakk
2025-12-13 13:46 ` [PATCH v2 2/3] replay: improve --contained and add to doc kristofferhaugsbakk
2025-12-13 13:46 ` [PATCH v2 3/3] doc: replay: link section using markup kristofferhaugsbakk
2025-12-15 10:13 ` [PATCH v2 0/3] doc: replay: improvements like "mention no output on conflicts" Phillip Wood
2025-12-15 11:59 ` Kristoffer Haugsbakk
2025-12-16 0:29 ` Junio C Hamano
2025-12-16 14:25 ` Phillip Wood
2025-12-20 19:34 ` Kristoffer Haugsbakk
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=753daaa4-e675-4d28-9c13-4f5ede0f3b47@app.fastmail.com \
--to=kristofferhaugsbakk@fastmail$(echo .)com \
--cc=christian.couder@gmail$(echo .)com \
--cc=code@khaugsbakk$(echo .)name \
--cc=git@vger$(echo .)kernel.org \
--cc=gitster@pobox$(echo .)com \
--cc=newren@gmail$(echo .)com \
--cc=siddharthasthana31@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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