From d289d13625ffa568c3007c3620eaafeb521ac06d Mon Sep 17 00:00:00 2001 From: "Eric W. Biederman" Date: Thu, 14 Jul 2005 18:50:33 -0600 Subject: [PATCH] Move git_author_info and git_commiter_info to ident.c Moving these functions allows all of the logic for figuring out what these values are to be shared between programs. Signed-off-by: Linus Torvalds --- ident.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'ident.c') diff --git a/ident.c b/ident.c index faff44175b..8da5609cb6 100644 --- a/ident.c +++ b/ident.c @@ -136,3 +136,13 @@ char *get_ident(const char *name, const char *email, const char *date_str) buffer[i] = 0; return buffer; } + +char *git_author_info(void) +{ + return get_ident(gitenv("GIT_AUTHOR_NAME"), gitenv("GIT_AUTHOR_EMAIL"), gitenv("GIT_AUTHOR_DATE")); +} + +char *git_committer_info(void) +{ + return get_ident(gitenv("GIT_COMMITTER_NAME"), gitenv("GIT_COMMITTER_EMAIL"), gitenv("GIT_COMMITTER_DATE")); +} -- cgit v1.2.1