diff mbox series

[05/13] test-date: drop unused "now" parameter from parse_dates()

Message ID 20190320081430.GE10403@sigill.intra.peff.net (mailing list archive)
State New, archived
Headers show
Series more unused parameter cleanups | expand

Commit Message

Jeff King March 20, 2019, 8:14 a.m. UTC
We only need the current time for relative dates like "5
minutes ago", and those are parsed only through approxidate,
not the strict parser used by parse_dates().

Signed-off-by: Jeff King <peff@peff.net>
---
 t/helper/test-date.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/t/helper/test-date.c b/t/helper/test-date.c
index b3253803ac..585347ea48 100644
--- a/t/helper/test-date.c
+++ b/t/helper/test-date.c
@@ -55,7 +55,7 @@  static void show_dates(const char **argv, const char *format)
 	}
 }
 
-static void parse_dates(const char **argv, struct timeval *now)
+static void parse_dates(const char **argv)
 {
 	struct strbuf result = STRBUF_INIT;
 
@@ -124,7 +124,7 @@  int cmd__date(int argc, const char **argv)
 	else if (skip_prefix(*argv, "show:", &x))
 		show_dates(argv+1, x);
 	else if (!strcmp(*argv, "parse"))
-		parse_dates(argv+1, &now);
+		parse_dates(argv+1);
 	else if (!strcmp(*argv, "approxidate"))
 		parse_approxidate(argv+1, &now);
 	else if (!strcmp(*argv, "timestamp"))