summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2014-05-01 21:07:22 -0400
committerJunio C Hamano <gitster@pobox.com>2014-05-02 14:13:00 -0700
commitd1053246554d176173893a5283dc0c0fb563ed03 (patch)
tree480220c23e2c9f405e2cc7983375b48ac76e7681 /cache.h
parent4701026352ada1ebc36532272ca1e12897b1de11 (diff)
downloadgit-d1053246554d176173893a5283dc0c0fb563ed03.tar.gz
pretty: make show_ident_date public
We use this function internally to format "Date" lines in commit logs, but other parts of the code will want it, too. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/cache.h b/cache.h
index 107ac61b68..dd9e689daf 100644
--- a/cache.h
+++ b/cache.h
@@ -1046,6 +1046,13 @@ struct ident_split {
extern int split_ident_line(struct ident_split *, const char *, int);
/*
+ * Like show_date, but pull the timestamp and tz parameters from
+ * the ident_split. It will also sanity-check the values and produce
+ * a well-known sentinel date if they appear bogus.
+ */
+const char *show_ident_date(const struct ident_split *id, enum date_mode mode);
+
+/*
* Compare split idents for equality or strict ordering. Note that we
* compare only the ident part of the line, ignoring any timestamp.
*