Subject: Re: [PATCH v5 0/5] implement branch --recurse-submodules

From: Junio C Hamano <[email-masked]>
Date: Mon, 20 Dec 2021 11:50:04 -0800

Glen Choo <[email-masked]> writes:

> What happened was that I got confused by [1], where it reads:
>
>   [...]
>   find the tip of js/branch-track-inherit from 'seen' [*]
>   [...]
>
>   [Footnote]
>
>   * One way to do so would be:
>
>     $ git fetch
>     $ git show 'remote/origin/seen^{/^Merge branch .js/branch-track-inherit.}'
>
> The commit that I got was the "merge of js/branch-track-inherit into
> 'seen'", but what you intended was the "merge of js/branch-track-inherit
> into gc/branch-recurse-submodules"; I didn't realize that there might
> have been more than commit matching that regex.

Yeah, that was not quite clearly written.  The way it was showing
was to find the tip of the other branch.  The instruction was to
prepare you (and others reading from the sidelines) for a case where
your branch depends on somebody else's work that is *not* even in
'seen' (e.g. I may have an older version of 'seen' but there is a
newer and clearly improved version on the list that is likely to
replace).  In such a case, you'd 

 (1) "find" the tip of the other branch, either by traversing from
     the tip of 'seen' to find the merge and taking its second
     parent, or applying the latest from the list to a locally
     created topic branch forked off of 'main',

 (2) create your topic branch, forked off of 'main', and merge (1)
     into it, and

 (3) build your series on it.

If I have your previous round, and if the other topic you depend on
hasn't changed, you can omit (2) and instead find the equivalent of
(2) I created for your topic the last time I queued it.

> I made some commit message changes. Unless you think it's a good idea, I
> won't re-roll this to fix the issue.

Let's not waste your message changes to clarify the patches.

> So if my branch were not in 'seen', I should have based my changes on
> 'origin/js/branch-track-inherit'. If my branch is in 'seen', I should
> base it off the merge of js/branch-track-inherit' into my my branch?

Hopefully the above is clear now?  Sorry for the trouble.

Thanks.