git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: git@vger.kernel.org
Subject: [PATCH 6/6] fast-export: drop unused parameter from anonymize_commit_message()
Date: Wed, 22 Mar 2023 13:43:22 -0400	[thread overview]
Message-ID: <20230322174322.GD11424@coredump.intra.peff.net> (raw)
In-Reply-To: <20230322173636.GA5643@coredump.intra.peff.net>

As the comment above the function indicates, we do not bother actually
storing commit messages in our anonymization map. But we still take the
message as a parameter, and just ignore it. Let's stop doing that, which
will make -Wunused-parameter happier.

Signed-off-by: Jeff King <peff@peff.net>
---
 builtin/fast-export.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/builtin/fast-export.c b/builtin/fast-export.c
index 12adf75964c..f3cc5486861 100644
--- a/builtin/fast-export.c
+++ b/builtin/fast-export.c
@@ -556,7 +556,7 @@ static const char *anonymize_refname(const char *refname)
  * We do not even bother to cache commit messages, as they are unlikely
  * to be repeated verbatim, and it is not that interesting when they are.
  */
-static char *anonymize_commit_message(const char *old)
+static char *anonymize_commit_message(void)
 {
 	static int counter;
 	return xstrfmt("subject %d\n\nbody\n", counter++);
@@ -683,7 +683,7 @@ static void handle_commit(struct commit *commit, struct rev_info *rev,
 
 	mark_next_object(&commit->object);
 	if (anonymize) {
-		reencoded = anonymize_commit_message(message);
+		reencoded = anonymize_commit_message();
 	} else if (encoding) {
 		switch(reencode_mode) {
 		case REENCODE_YES:
-- 
2.40.0.595.g9b96b494d8c

  parent reply	other threads:[~2023-03-22 17:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-22 17:36 [PATCH 0/6] minor cleanups to fast-export --anonymize Jeff King
2023-03-22 17:37 ` [PATCH 1/6] fast-export: drop const when storing anonymized values Jeff King
2023-03-22 17:38 ` [PATCH 2/6] fast-export: simplify initialization of anonymized hashmaps Jeff King
2023-03-22 17:40 ` [PATCH 3/6] fast-export: factor out anonymized_entry creation Jeff King
2023-03-22 17:42 ` [PATCH 4/6] fast-export: de-obfuscate --anonymize-map handling Jeff King
2023-03-22 17:42 ` [PATCH 5/6] fast-export: drop data parameter from anonymous generators Jeff King
2023-03-22 17:43 ` Jeff King [this message]
2023-03-24 17:40 ` [PATCH 0/6] minor cleanups to fast-export --anonymize Derrick Stolee
2023-03-24 19:46   ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230322174322.GD11424@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).