]> git.ipfire.org Git - thirdparty/git.git/commitdiff
fast-export: drop unused parameter from anonymize_commit_message()
authorJeff King <peff@peff.net>
Wed, 22 Mar 2023 17:43:22 +0000 (13:43 -0400)
committerJunio C Hamano <gitster@pobox.com>
Wed, 22 Mar 2023 22:37:09 +0000 (15:37 -0700)
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>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/fast-export.c

index 12adf75964cbeaa9007f5e3ae195f6a9aa25a6d8..f3cc548686180fb12faee8cd717e99eb2e2d61b7 100644 (file)
@@ -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: