aboutsummaryrefslogtreecommitdiff
path: root/ident.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2005-07-14 18:50:33 -0600
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-15 10:00:35 -0700
commitd289d13625ffa568c3007c3620eaafeb521ac06d (patch)
tree8ea52a947f32245c39d746d3a2ca9b3f1a8d258d /ident.c
parente64e1b79d7c50a234e97d59aadc7a4911de91efe (diff)
downloadgit-d289d13625ffa568c3007c3620eaafeb521ac06d.tar.gz
git-d289d13625ffa568c3007c3620eaafeb521ac06d.tar.xz
[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 <torvalds@osdl.org>
Diffstat (limited to 'ident.c')
-rw-r--r--ident.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/ident.c b/ident.c
index faff44175..8da5609cb 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"));
+}