Skip to content

Commit 04c4c76

Browse files
peffgitster
authored andcommitted
test-date: drop unused "now" parameter from parse_dates()
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>
1 parent 5bb1cb6 commit 04c4c76

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

t/helper/test-date.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ static void show_dates(const char **argv, const char *format)
5555
}
5656
}
5757

58-
static void parse_dates(const char **argv, struct timeval *now)
58+
static void parse_dates(const char **argv)
5959
{
6060
struct strbuf result = STRBUF_INIT;
6161

@@ -124,7 +124,7 @@ int cmd__date(int argc, const char **argv)
124124
else if (skip_prefix(*argv, "show:", &x))
125125
show_dates(argv+1, x);
126126
else if (!strcmp(*argv, "parse"))
127-
parse_dates(argv+1, &now);
127+
parse_dates(argv+1);
128128
else if (!strcmp(*argv, "approxidate"))
129129
parse_approxidate(argv+1, &now);
130130
else if (!strcmp(*argv, "timestamp"))

0 commit comments

Comments
 (0)