Re: [PATCH v1 0/8] format-patch: introduce --confirm-overwrite

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Denton,

Denton Liu <liu.denton@xxxxxxxxx> writes:

> Hi Felipe,
>
> On Thu, May 06, 2021 at 08:46:16PM -0500, Felipe Contreras wrote:
>> Firmin Martin wrote:
>> > Currently, git-format-patch, along with the option --cover-letter,
>> > unconditionally overwrites a cover letter with the same name (if
>> > present). Although this is a desired behaviour for patches which are
>> > auto-generated from Git commits log, it might not be the case for a
>> > cover letter whose the content is meticulously written manually.
>> 
>> This is one of the reasons I never use git format-patch directly, but I
>> use a tool on top: git send-series[1].
>
> It seems like everyone has written some sort of tooling on top of
> format-patch at this point. Taking a cursory look at your tool, perhaps
> a feature like `--previous-cover-letter <file>` might provide most of
> the functionality that most tooling that I've seen gives.

This is a good idea. We can default <file> to the target cover letter
(e.g., if -v2 is passed, v2-0000-cover-letter.patch or if
--numbered-files is passed, 0) if present, or the previous series' cover
letter.

> Perhaps this option could parse a cover letter from a previous version
> of a patch and use it to populate the next version number, In-Reply-To,
> cover letter subject/body, To/Cc lists and maybe more.

Absolutely.

> I think that extracting the information would be pretty easy but
> designing the UI it in a non-obtuse way would be pretty challenging.
>
>> It would be nice if git format-patch grabbed the text of the body from
>> somewhere, and even better if git branch learned --edit-cover-letter.
>
> Well, you're in luck! I wanted the same thing a couple of years back so
> I implemented the --cover-from-description option[0]. It allows the cover
> letter to be populated by the text given in
> `git branch --edit-description`.

This is the reason I CCed you!

Thanks for your comment,

Firmin


>
> -Denton
>
> [0]: https://git-scm.com/docs/git-format-patch#Documentation/git-format-patch.txt---cover-from-descriptionltmodegt



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux