diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-08-03 11:01:27 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-08-03 11:01:27 -0700 |
commit | d939af12bd96db7ad3e671a0585ad8570aa7e9d3 (patch) | |
tree | 5772ac1192ed299db657ffcfbc71c318521db653 /test-date.c | |
parent | 980a3d3dd742d534b394b04e578c2de5e3ee4793 (diff) | |
parent | e4f031e34b08e3217c10942e682920a6939308a0 (diff) |
Merge branch 'jk/date-mode-format'
Teach "git log" and friends a new "--date=format:..." option to
format timestamps using system's strftime(3).
* jk/date-mode-format:
strbuf: make strbuf_addftime more robust
introduce "format" date-mode
convert "enum date_mode" into a struct
show-branch: use DATE_RELATIVE instead of magic number
Diffstat (limited to 'test-date.c')
-rw-r--r-- | test-date.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test-date.c b/test-date.c index 94a6997a8f..63f373557e 100644 --- a/test-date.c +++ b/test-date.c @@ -29,7 +29,7 @@ static void parse_dates(char **argv, struct timeval *now) parse_date(*argv, &result); if (sscanf(result.buf, "%lu %d", &t, &tz) == 2) printf("%s -> %s\n", - *argv, show_date(t, tz, DATE_ISO8601)); + *argv, show_date(t, tz, DATE_MODE(ISO8601))); else printf("%s -> bad\n", *argv); } @@ -41,7 +41,7 @@ static void parse_approxidate(char **argv, struct timeval *now) for (; *argv; argv++) { time_t t; t = approxidate_relative(*argv, now); - printf("%s -> %s\n", *argv, show_date(t, 0, DATE_ISO8601)); + printf("%s -> %s\n", *argv, show_date(t, 0, DATE_MODE(ISO8601))); } } |