Subject: Re: On-branch topic description support?

From: Junio C Hamano <[email-masked]>
Date: Thu, 21 Jul 2022 10:29:23 -0700

Philip Oakley <[email-masked]> writes:

> If one has a plan in place for a series in preparation, I'd want to
> prepare the outline of the cover letter first, and then later let it
> float to the tip of the series after a rebase, and incorporate (meld)
> additional notelets recorded as additional empty commits.
>
> On thought is to marry this with the `rebase --autosquash` mechanism
> that will rearrange commits (when enabled) so that we could have a
> "branchtip! " subject line, similar to the `fixup! / squash!` subject
> lines to assist in that rearrangement  of the series for transmission.

Yeah, people have different preferences, and "rebase -i" is probably
a key ingredient to make it work.  As long as the convention to have
topic description at a fixed known place on the topic branch, be it
at the top or at the bottom, is followed in the end result, other
tools like format-patch, am and merge can be written to follow and
take advantage that known structure/topology of the topic branch.

> I'm not yet sure how the "branchtip" method would work with Pull
> Requests and the idea of actually having a push/pull exchangeable branch
> description

I think what I described for "merge" would work well for pull
requests (not the traditional e-mail kind of "please pull" we see on
the kernel mailing list, but the GitHub kind).  Merge the topic
proper, excluding the tip "empty" commit that is there only to hold
the description of the topic, into the history, and use the log
message from the empty commit the procedure discards as the log
message for the resulting merge.