summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-02-07 06:05:24 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-02-07 06:05:24 (GMT)
commitecbe1beb8e41664ac00581234a449c4487600e1d (patch)
treed53750776f3409aa3b3646c2b4027ac487e6c70a /cache.h
parent13e263095b55c88b7af86c3c88f8b0f937eb4d5c (diff)
parent110a6a161d304cac5e50306c70510f38000224bb (diff)
downloadgit-ecbe1beb8e41664ac00581234a449c4487600e1d.zip
git-ecbe1beb8e41664ac00581234a449c4487600e1d.tar.gz
git-ecbe1beb8e41664ac00581234a449c4487600e1d.tar.bz2
Merge branch 'lt/date-human'
A new date format "--date=human" that morphs its output depending on how far the time is from the current time has been introduced. "--date=auto" can be used to use this new format when the output is going to the pager or to the terminal and otherwise the default format. * lt/date-human: Add `human` date format tests. Add `human` format to test-tool Add 'human' date format documentation Replace the proposed 'auto' mode with 'auto:' Add 'human' date format
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/cache.h b/cache.h
index 400bc0a..ef9f3c4 100644
--- a/cache.h
+++ b/cache.h
@@ -1463,6 +1463,7 @@ extern struct object *peel_to_type(const char *name, int namelen,
enum date_mode_type {
DATE_NORMAL = 0,
+ DATE_HUMAN,
DATE_RELATIVE,
DATE_SHORT,
DATE_ISO8601,
@@ -1490,6 +1491,8 @@ struct date_mode *date_mode_from_type(enum date_mode_type type);
const char *show_date(timestamp_t time, int timezone, const struct date_mode *mode);
void show_date_relative(timestamp_t time, const struct timeval *now,
struct strbuf *timebuf);
+void show_date_human(timestamp_t time, int tz, const struct timeval *now,
+ struct strbuf *timebuf);
int parse_date(const char *date, struct strbuf *out);
int parse_date_basic(const char *date, timestamp_t *timestamp, int *offset);
int parse_expiry_date(const char *date, timestamp_t *timestamp);