aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cache.h7
-rw-r--r--pretty.c4
2 files changed, 9 insertions, 2 deletions
diff --git a/cache.h b/cache.h
index 107ac61b6..dd9e689da 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.
*
diff --git a/pretty.c b/pretty.c
index 3c43db558..e1e2cad36 100644
--- a/pretty.c
+++ b/pretty.c
@@ -393,8 +393,8 @@ static void add_rfc2047(struct strbuf *sb, const char *line, size_t len,
strbuf_addstr(sb, "?=");
}
-static const char *show_ident_date(const struct ident_split *ident,
- enum date_mode mode)
+const char *show_ident_date(const struct ident_split *ident,
+ enum date_mode mode)
{
unsigned long date = 0;
long tz = 0;