All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: git@vger.kernel.org
Subject: [PATCH 01/14] test-ref-store: drop unimplemented reflog-expire command
Date: Mon, 3 Jul 2023 02:43:58 -0400	[thread overview]
Message-ID: <20230703064358.GA3537614@coredump.intra.peff.net> (raw)
In-Reply-To: <20230703064347.GA3524892@coredump.intra.peff.net>

The reflog-expire command has been unimplemented since it was added in
80f2a6097c (t/helper: add test-ref-store to test ref-store functions,
2017-03-26). This causes -Wunused-parameter to complain, since the
function just calls die() without looking at its arguments.

We could mark these as UNUSED to silence the warning. But let's just
drop the function. It has no callers in the test suite and is not doing
anything useful, beyond perhaps reminding us that it's something we
_could_ be testing.

But since the bulk of the work in adding such tests would be the shell
bits that actually examine the reflog state before and after expiration,
this is not even a useful step in that direction. Somebody who wants to
do that work later can easily add this function back.

Signed-off-by: Jeff King <peff@peff.net>
---
 t/helper/test-ref-store.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/t/helper/test-ref-store.c b/t/helper/test-ref-store.c
index fb18831ec2..aa900cbfab 100644
--- a/t/helper/test-ref-store.c
+++ b/t/helper/test-ref-store.c
@@ -268,11 +268,6 @@ static int cmd_delete_reflog(struct ref_store *refs, const char **argv)
 	return refs_delete_reflog(refs, refname);
 }
 
-static int cmd_reflog_expire(struct ref_store *refs, const char **argv)
-{
-	die("not supported yet");
-}
-
 static int cmd_delete_ref(struct ref_store *refs, const char **argv)
 {
 	const char *msg = notnull(*argv++, "msg");
@@ -326,7 +321,6 @@ static struct command commands[] = {
 	{ "reflog-exists", cmd_reflog_exists },
 	{ "create-reflog", cmd_create_reflog },
 	{ "delete-reflog", cmd_delete_reflog },
-	{ "reflog-expire", cmd_reflog_expire },
 	/*
 	 * backend transaction functions can't be tested separately
 	 */
-- 
2.41.0.586.g3c0cc15bc7


  reply	other threads:[~2023-07-03  6:44 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-03  6:43 [PATCH 0/14] more -Wunused-parameter annotations Jeff King
2023-07-03  6:43 ` Jeff King [this message]
2023-07-03  6:44 ` [PATCH 02/14] do_for_each_ref_helper(): mark unused repository parameter Jeff King
2023-07-03  6:44 ` [PATCH 03/14] http: mark unused parameters in curl callbacks Jeff King
2023-07-03  6:44 ` [PATCH 04/14] http-push: mark unused parameter in xml callback Jeff King
2023-07-03  6:44 ` [PATCH 05/14] am: mark unused keep_cr parameters Jeff King
2023-07-03  6:44 ` [PATCH 06/14] count-objects: mark unused parameter in alternates callback Jeff King
2023-07-03  6:44 ` [PATCH 07/14] revisions: drop unused "opt" parameter in "tweak" callbacks Jeff King
2023-07-03  6:44 ` [PATCH 08/14] fsck: mark unused parameters in various fsck callbacks Jeff King
2023-07-03  6:44 ` [PATCH 09/14] merge-tree: mark unused parameter in traverse callback Jeff King
2023-07-03  6:44 ` [PATCH 10/14] replace: mark unused parameter in ref callback Jeff King
2023-07-03  6:44 ` [PATCH 11/14] replace: mark unused parameter in each_mergetag_fn callback Jeff King
2023-07-03  6:44 ` [PATCH 12/14] rev-parse: mark unused parameter in for_each_abbrev callback Jeff King
2023-07-03  6:44 ` [PATCH 13/14] tag: mark unused parameters in each_tag_name_fn callbacks Jeff King
2023-07-03  6:44 ` [PATCH 14/14] t/helper: mark unused callback void data parameters Jeff King

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

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

  git send-email \
    --in-reply-to=20230703064358.GA3537614@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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.