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

[PATCH 4/5] ref-filter: drop unused parameters from email_atom_option_parser()

From
Jeff King <peff@peff.net>
Date
Aug 17, 2024, 07:29 UTC
Message-ID
<20240817072945.GD1535915@coredump.intra.peff.net>
In-Reply-To
<20240817072621.GA1535666@coredump.intra.peff.net>

This code was extracted from person_email_atom_parser() in a3d2e83a17 (ref-filter: add mailmap support, 2023-09-25), but the part that was extracted doesn't care about the atom struct or the error strbuf.

Signed-off-by: Jeff King <peff@peff.net>
---
 ref-filter.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/ref-filter.c b/ref-filter.c
index 6d8b591930..2d7a65a56b 100644
--- a/ref-filter.c
+++ b/ref-filter.c
@@ -742,8 +742,7 @@ static int person_name_atom_parser(struct ref_format *format UNUSED,
 	return 0;
 }
 
-static int email_atom_option_parser(struct used_atom *atom,
-				    const char **arg, struct strbuf *err)
+static int email_atom_option_parser(const char **arg)
 {
 	if (!*arg)
 		return EO_RAW;
@@ -761,7 +760,7 @@ static int person_email_atom_parser(struct ref_format *format UNUSED,
 				    const char *arg, struct strbuf *err)
 {
 	for (;;) {
-		int opt = email_atom_option_parser(atom, &arg, err);
+		int opt = email_atom_option_parser(&arg);
 		const char *bad_arg = arg;
 
 		if (opt < 0)
-- 
2.46.0.585.gd6679c16d8
Previous: Jeff KingNext: Jeff King
Message 6 of 7 in “dropping some more unused parameters”
  1. 0/5 dropping some more unused parametersJeff King, Aug 17, 2024
  2. 1/5 refs: drop some unused parameters from create_symref_lock()Jeff King, Aug 17, 2024
  3. 2/5 pack-bitmap: load writer config from repository parameterJeff King, Aug 17, 2024
  4. Eric SunshineAug 17, 2024
  5. 3/5 pack-bitmap: drop unused parameters from select_pseudo_merges()Jeff King, Aug 17, 2024
  6. 4/5 ref-filter: drop unused parameters from email_atom_option_parser()Jeff King, Aug 17, 2024
  7. 5/5 diff-lib: drop unused index argument from get_stat_data()Jeff King, Aug 17, 2024

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.