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>
This commit is contained in:
Jeff King
2014-05-01 21:07:22 -04:00
committed by Junio C Hamano
parent 4701026352
commit d105324655
2 changed files with 9 additions and 2 deletions

View File

@ -1045,6 +1045,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.