summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 11dbe9e)
raw | patch | inline | side by side (parent: 11dbe9e)
author | Junio C Hamano <junkio@cox.net> | |
Mon, 5 Feb 2007 01:50:14 +0000 (17:50 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Mon, 5 Feb 2007 01:50:14 +0000 (17:50 -0800) |
This makes the functionality of ident.c::get_ident() available to
other callers.
Signed-off-by: Junio C Hamano <junkio@cox.net>
other callers.
Signed-off-by: Junio C Hamano <junkio@cox.net>
cache.h | patch | blob | history | |
ident.c | patch | blob | history |
index 201704bacf5e7c03ccab9b81b01f94cf50fe943e..38a9bc02f6d765fb743d6070bbd145cdd673d43d 100644 (file)
--- a/cache.h
+++ b/cache.h
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);
struct checkout {
const char *base_dir;
index a6fc7b5e11e3f232a7becd62223cc23c5eb68ccc..bb03bddd34f2471ed130c499affc369758d4bfd9 100644 (file)
--- a/ident.c
+++ b/ident.c
"Add --global to set your account\'s default\n"
"\n";
-static const char *get_ident(const char *name, const char *email,
- const char *date_str, int error_on_no_name)
+const char *fmt_ident(const char *name, const char *email,
+ const char *date_str, int error_on_no_name)
{
static char buffer[1000];
char date[50];
const char *git_author_info(int error_on_no_name)
{
- return get_ident(getenv("GIT_AUTHOR_NAME"),
+ return fmt_ident(getenv("GIT_AUTHOR_NAME"),
getenv("GIT_AUTHOR_EMAIL"),
getenv("GIT_AUTHOR_DATE"),
error_on_no_name);
const char *git_committer_info(int error_on_no_name)
{
- return get_ident(getenv("GIT_COMMITTER_NAME"),
+ return fmt_ident(getenv("GIT_COMMITTER_NAME"),
getenv("GIT_COMMITTER_EMAIL"),
getenv("GIT_COMMITTER_DATE"),
error_on_no_name);