]> git.ipfire.org Git - thirdparty/git.git/commitdiff
test-date: drop unused "now" parameter from parse_dates()
authorJeff King <peff@peff.net>
Wed, 20 Mar 2019 08:14:30 +0000 (04:14 -0400)
committerJunio C Hamano <gitster@pobox.com>
Wed, 20 Mar 2019 09:34:09 +0000 (18:34 +0900)
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>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/helper/test-date.c

index b3253803ac8ce66625e346fcbce3ca9c9a16ae55..585347ea487a3c1ed9754d66d454a2f20f332154 100644 (file)
@@ -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"))