summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2012-05-21 23:09:43 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-05-22 16:07:52 (GMT)
commitbcb2b0044b3baedf7857613ec069f300c364680c (patch)
tree61dac600dabd49b867ae598f4243a9c5ba12b041 /cache.h
parentcd07cc53125fb2ca77a644831d4e5d9517bb7a05 (diff)
downloadgit-bcb2b0044b3baedf7857613ec069f300c364680c.zip
git-bcb2b0044b3baedf7857613ec069f300c364680c.tar.gz
git-bcb2b0044b3baedf7857613ec069f300c364680c.tar.bz2
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 <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
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 e14ffcd..0c095d4 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);