From bcb2b0044b3baedf7857613ec069f300c364680c Mon Sep 17 00:00:00 2001 From: Jeff King Date: Mon, 21 May 2012 19:09:43 -0400 Subject: ident: split setup_ident into separate functions This function sets up the default name, email, and date, and is not publicly available. Let's split it into three public functions so that callers can get just the parts they need. While we're at it, let's change the interface to simple accessors. The original function was called only by fmt_ident, and contained logic for "if we already have some other value, don't load the default" which properly belongs in fmt_ident. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- cache.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'cache.h') diff --git a/cache.h b/cache.h index e14ffcd914..0c095d4842 100644 --- a/cache.h +++ b/cache.h @@ -894,6 +894,9 @@ extern const char *git_author_info(int); extern const char *git_committer_info(int); extern const char *fmt_ident(const char *name, const char *email, const char *date_str, int); extern const char *fmt_name(const char *name, const char *email); +extern const char *ident_default_name(void); +extern const char *ident_default_email(void); +extern const char *ident_default_date(void); extern const char *git_editor(void); extern const char *git_pager(int stdout_is_tty); -- cgit v1.2.3