From: Junio C Hamano Date: Wed, 04 Dec 2019 16:22:43 GMT Subject: Re: [PATCH v2] contrib: git-cpcover: copy cover letter Message-ID: In-Reply-To: Eric Sunshine writes: > On Tue, Dec 3, 2019 at 11:45 PM Jonathan Nieder wrote: >> Michael S. Tsirkin wrote: >> > My flow looks like this: >> > 2. vi /v-0000-cover-letter.patch /v-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 --cover-letter \ >> --last-cover-letter=/v-0000-cover-letter.patch \ >> -o > > 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 which has the combined effect > of setting the re-roll count (like -v) and automagically copying the > cover letter material from cover letter v located in . I actually looked into doing something similar but without any new option (i.e. unconditionally --cover-letter with -v would check for v-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 , let's compare with " 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.