t/helper: merge test-date into test-tool

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Nguyễn Thái Ngọc Duy
2018-03-24 08:44:36 +01:00
committed by Junio C Hamano
parent e499894443
commit a801a7cfc7
7 changed files with 19 additions and 16 deletions

View File

@ -1,13 +1,14 @@
#include "test-tool.h"
#include "cache.h"
static const char *usage_msg = "\n"
" test-date relative [time_t]...\n"
" test-date show:<format> [time_t]...\n"
" test-date parse [date]...\n"
" test-date approxidate [date]...\n"
" test-date timestamp [date]...\n"
" test-date is64bit\n"
" test-date time_t-is64bit\n";
" test-tool date relative [time_t]...\n"
" test-tool date show:<format> [time_t]...\n"
" test-tool date parse [date]...\n"
" test-tool date approxidate [date]...\n"
" test-tool date timestamp [date]...\n"
" test-tool date is64bit\n"
" test-tool date time_t-is64bit\n";
static void show_relative_dates(const char **argv, struct timeval *now)
{
@ -81,7 +82,7 @@ static void parse_approx_timestamp(const char **argv, struct timeval *now)
}
}
int cmd_main(int argc, const char **argv)
int cmd__date(int argc, const char **argv)
{
struct timeval now;
const char *x;