git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Eric Sunshine <sunshine@sunshineco.com>
Cc: Jonathan Nieder <jrnieder@gmail.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	Git List <git@vger.kernel.org>
Subject: Re: [PATCH v2] contrib: git-cpcover: copy cover letter
Date: Wed, 04 Dec 2019 08:22:43 -0800	[thread overview]
Message-ID: <xmqqlfrs5acs.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <CAPig+cTFbpAo5+kahLT+7E1zQe24S5icm0SSB=HF4xqsD2VdAA@mail.gmail.com> (Eric Sunshine's message of "Wed, 4 Dec 2019 00:18:28 -0500")

Eric Sunshine <sunshine@sunshineco.com> writes:

> On Tue, Dec 3, 2019 at 11:45 PM Jonathan Nieder <jrnieder@gmail.com> wrote:
>> Michael S. Tsirkin wrote:
>> > My flow looks like this:
>> > 2. vi <dir>/v<n-1>-0000-cover-letter.patch <dir>/v<n>-0000-cover-letter.patch
>> > copy subject and blurb, avoiding patchset stats
>> > 3. add changelog update blurb as appropriate
>> >
>> > The following perl script automates step 2 above.
>>
>> Neat.  I wonder, should "git format-patch" learn an option for this?
>>         git format-patch -v<n> --cover-letter \
>>                 --last-cover-letter=<dir>/v<n-1>-0000-cover-letter.patch \
>>                 -o <dir>
>
> That was my first thought, as well, although, as this has similar
> purpose to the new git-format-patch --cover-from-description= option,
> perhaps a more suitable name might be --copy-cover-from= or something?
>
> I could even imagine a new option -V<n> which has the combined effect
> of setting the re-roll count (like -v) and automagically copying the
> cover letter material from cover letter v<n-1> located in <dir>.

I actually looked into doing something similar but without any new
option (i.e. unconditionally --cover-letter with -v<n> would check
for v<n-1>-0000-cover.letter and does the right thing) some time
ago.  I do not recall why I gave up (not that I tried very hard),
but IIRC, the current reroll-count was not passed down in the
callchain to make_cover_letter() to do this.

But I think that was even before we integrated the range-diff stuff,
which does seem to use the "given we are doing <n>, let's compare
with <n-1>" thing, so perhaps it is not too difficult.

I am just saying that I think the change would not have to be opt-in,
but can be unconditionally made, simply because replacing the BLURB
HERE placeholder with *anything* written by human user previously is
a 100% improvement ;-)

Thanks.

  reply	other threads:[~2019-12-04 16:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-03 20:13 [PATCH v2] contrib: git-cpcover: copy cover letter Michael S. Tsirkin
2019-12-04  4:44 ` Jonathan Nieder
2019-12-04  5:18   ` Eric Sunshine
2019-12-04 16:22     ` Junio C Hamano [this message]
2019-12-04 16:32       ` Eric Sunshine
2019-12-04 17:07         ` Junio C Hamano
2019-12-09 15:49   ` Michael S. Tsirkin
2019-12-04  6:58 ` Denton Liu

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=xmqqlfrs5acs.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=jrnieder@gmail.com \
    --cc=mst@redhat.com \
    --cc=sunshine@sunshineco.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).