Re: [PATCH 3/4] format-patch: new --resend option for adding "RESEND" to patch subjects

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

 



On 2024-04-17 08:35, Eric Sunshine wrote:
On Tue, Apr 16, 2024 at 11:33 PM Dragan Simic <dsimic@xxxxxxxxxxx> wrote:
Add --resend as the new command-line option for "git format-patch" that adds "RESEND" as a (sub)suffix to the patch subject prefix, eventually producing
"[PATCH RESEND]" as the default patch subject prefix.

"[PATCH RESEND]" is a patch subject prefix commonly used on mailing lists for patches resent to a mailing list after they had attracted no attention for some time, usually for a couple of weeks. As such, this subject prefix deserves adding --resend as a new shorthand option to "git format-patch".

Of course, add the description of the new --resend command-line option to
the documentation for "git format-patch".

Signed-off-by: Dragan Simic <dsimic@xxxxxxxxxxx>
---
diff --git a/builtin/log.c b/builtin/log.c
@@ -2111,7 +2116,9 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
        if (keep_subject && subject_prefix)
- die(_("options '%s' and '%s' cannot be used together"), "--subject-prefix/--rfc", "-k"); + die(_("options '%s' and '%s' cannot be used together"), "--subject-prefix/--rfc/--resend", "-k");

You probably want to be using die_for_incompatible_opt4() from
parse-options.h here.

Thanks for the suggestion.  Frankly, I haven't researched the
available options, assuming that the current code uses the right
option.  Of course, I'll have a detailed look into it.

(And you may want a preparatory patch which fixes the preimage to use
die_for_incompatible_opt3() for --subject-prefix, --rfc, and -k
exclusivity, though that may be overkill.)

I'm not really sure what to do.  Maybe the other reviewers would
prefer an orthogonal approach instead?  Maybe that would be better
for bisecting later, if need arises for that?




[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