git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Shaoxuan Yuan <shaoxuan.yuan02@gmail.com>
To: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: On-branch topic description support?
Date: Thu, 21 Jul 2022 08:52:59 +0800	[thread overview]
Message-ID: <eb89cdfd-8461-4673-5bfa-b0f4f6bf28dd@gmail.com> (raw)
In-Reply-To: <xmqqilnr1hff.fsf@gitster.g>

On 7/21/2022 7:40 AM, Junio C Hamano wrote:
 > I've been playing with this idea from time to time, but recently I
 > started seeing a related discussion on the b4 front, so I thought I
 > would throw it out and how people would think.
 >
 > We made "git merge" not to silently commit the result, but open the
 > editor to encourage the integrator to describe what the topic is
 > about.  We also made "git format-patch" prepare [PATCH 0/n] aka
 > "cover letter" so that the author of the patch series can express
 > what the overall topic is about.  What the author should say in the
 > cover letter very much overlaps what the integrator wants to have in
 > the log message of the commit that merges the topic to the
 > integration branch.
 >
 > But there are two (and half) links from format-patch to that merge
 > commit that are missing.
 >
 >  - You cannot prepare the cover letter material while working on the
 >    topic---instead, you have to write one by editing the output from
 >    "format-patch --cover-letter";

This bothered me for a long time. Across every "rebase -i", I could see
a chance to modify the cover letter, but only right before sending the
patch I got the chance to compose a summary of what I've done in the
series, and that often makes me forget about things that should be in
the cover letter. And I have to keep a draft somewhere to record the loose
thoughts along the way.

 >  - "git am" at the receiving end discards the cover letter when
 >    queuing the e-mailed patches to a topic.
 >
 >  - "git merge" cannot take advantage of the cover letter that was
 >    discarded when the topic was queued.
 >
 > So, here is how I would imagine a slightly better world may work.
 >
 >  * When you are almost finished with the initial draft of your
 >    topic, you'd write a cover letter, and record it as the log
 >    message of an empty commit at the tip of the topic.  As you go on
 >    polishing the topic with "rebase -i", the empty commit would be
 >    kept (if we currently lose an empty commit by default, we may
 >    need to teach "rebase -i" to special case an empty commit at the
 >    tip of the range to make this convenient to use), and you would
 >    keep it up to date as you update the topic.
 >
 >  * "git format-patch" would notice that the topic has such an empty
 >    commit at the tip, and use the log message from it to
 >    pre-populate the cover letter.

It sounds pretty neat to have this on-the-go topic recorder :-)

--
Thanks,
Shaoxuan


  reply	other threads:[~2022-07-21  0:53 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 [this message]
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
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=eb89cdfd-8461-4673-5bfa-b0f4f6bf28dd@gmail.com \
    --to=shaoxuan.yuan02@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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).