summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cache.h2
-rw-r--r--commit-tree.c10
-rw-r--r--ident.c10
3 files changed, 12 insertions, 10 deletions
diff --git a/cache.h b/cache.h
index 35e0ad7..73e05dc 100644
--- a/cache.h
+++ b/cache.h
@@ -224,6 +224,8 @@ void datestamp(char *buf, int bufsize);
extern int setup_ident(void);
extern char *get_ident(const char *name, const char *email, const char *date_str);
+extern char *git_author_info(void);
+extern char *git_committer_info(void);
static inline void *xmalloc(size_t size)
{
diff --git a/commit-tree.c b/commit-tree.c
index 8f3b96c..d545f62 100644
--- a/commit-tree.c
+++ b/commit-tree.c
@@ -79,16 +79,6 @@ static int new_parent(int idx)
return 1;
}
-static char *git_author_info(void)
-{
- return get_ident(gitenv("GIT_AUTHOR_NAME"), gitenv("GIT_AUTHOR_EMAIL"), gitenv("GIT_AUTHOR_DATE"));
-}
-
-static char *git_committer_info(void)
-{
- return get_ident(gitenv("GIT_COMMITTER_NAME"), gitenv("GIT_COMMITTER_EMAIL"), gitenv("GIT_COMMITTER_DATE"));
-}
-
int main(int argc, char **argv)
{
int i;
diff --git a/ident.c b/ident.c
index faff441..8da5609 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"));
+}