git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[GSoC][RFC PATCH 1/6] builtin/log: add subject-extra-prefix flag to format-patch

From
Lucas Seiki Oshiro <lucasseikioshiro@gmail.com>
Date
Mar 3, 2025, 22:00 UTC
Message-ID
<20250303220029.10716-2-lucasseikioshiro@gmail.com>
In-Reply-To
<20250303220029.10716-1-lucasseikioshiro@gmail.com>

Add a new flag --subject-extra-prefix to format-patch. This flag is primarily targeted for new contributors that send emails with the suject starting with "[Newbie]", "[FirstTimer]" or "[Newcomer]" and developers from mentoring programs, which may start the subject with "[GSoC]", "[Outreachy]" or similar.

Signed-off-by: Lucas Seiki Oshiro <lucasseikioshiro@gmail.com>
---
 builtin/log.c | 4 ++++
 1 file changed, 4 insertions(+)
diff --git a/builtin/log.c b/builtin/log.c
index e41f88945e..95667c93ca 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -2036,6 +2036,7 @@ int cmd_format_patch(int argc,
 	struct strbuf rdiff2 = STRBUF_INIT;
 	struct strbuf rdiff_title = STRBUF_INIT;
 	const char *rfc = NULL;
+	const char *extra_prefix = NULL;
 	int creation_factor = -1;
 	const char *signature = git_version_string;
 	char *signature_to_free = NULL;
@@ -2079,6 +2080,9 @@ int cmd_format_patch(int argc,
 		OPT_CALLBACK_F(0, "subject-prefix", &cfg, N_("prefix"),
 			    N_("use [<prefix>] instead of [PATCH]"),
 			    PARSE_OPT_NONEG, subject_prefix_callback),
+		OPT_STRING(0, "subject-extra-prefix", &extra_prefix,
+			   N_("subject-extra-prefix"),
+			   N_("add an extra prefix at the beginning of the subject")),
 		OPT_CALLBACK_F('o', "output-directory", &output_directory,
 			    N_("dir"), N_("store resulting files in <dir>"),
 			    PARSE_OPT_NONEG, output_directory_callback),
-- 
2.39.5 (Apple Git-154)
Previous: Lucas Seiki OshiroNext: Lucas Seiki Oshiro
Message 2 of 15 in “Add --subject-extra-prefix flag to format-patch”
  1. Lucas Seiki OshiroMar 3, 2025
  2. [GSoC][RFC PATCH 1/6] builtin/log: add subject-extra-prefix flag to format-patchLucas Seiki Oshiro, Mar 3, 2025
  3. [GSoC][RFC PATCH 2/6] builtin/log: die if -k and --suject-extra-prefix are used togetherLucas Seiki Oshiro, Mar 3, 2025
  4. Eric SunshineMar 3, 2025
  5. [GSoC][RFC PATCH 3/6] revision: add subject_extra_field to struct rev_infoLucas Seiki Oshiro, Mar 3, 2025
  6. [GSoC][RFC PATCH 4/6] builtin/log: fill subject extra prefix in format-patchLucas Seiki Oshiro, Mar 3, 2025
  7. [GSoC][RFC PATCH 5/6] log-tree: add subject prefix in output email subjectLucas Seiki Oshiro, Mar 3, 2025
  8. [GSoC][RFC PATCH 6/6] t4014: add tests for the new flag --subject-extra-prefixLucas Seiki Oshiro, Mar 3, 2025
  9. Junio C HamanoMar 3, 2025
  10. Patrick SteinhardtMar 4, 2025
  11. Junio C HamanoMar 4, 2025
  12. Junio C HamanoMar 4, 2025
  13. Lucas Seiki OshiroMar 4, 2025
  14. Junio C HamanoMar 5, 2025
  15. Lucas Seiki OshiroMar 5, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.