summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e64e1b7)
raw | patch | inline | side by side (parent: e64e1b7)
author | Eric W. Biederman <ebiederm@xmission.com> | |
Fri, 15 Jul 2005 00:50:33 +0000 (18:50 -0600) | ||
committer | Linus Torvalds <torvalds@g5.osdl.org> | |
Fri, 15 Jul 2005 17:00:35 +0000 (10:00 -0700) |
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>
these values are to be shared between programs.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
cache.h | patch | blob | history | |
commit-tree.c | patch | blob | history | |
ident.c | patch | blob | history |
index 35e0ad7e0e0d6b58e0316ae52214509c99fdc89a..73e05dcd8b1445e650f0628768242f10b8dabd24 100644 (file)
--- a/cache.h
+++ b/cache.h
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 8f3b96c26df714554eb274999e185394a4c3f420..d545f62aaa48f2fb9f3aff5fd422c7ab32d94c62 100644 (file)
--- a/commit-tree.c
+++ b/commit-tree.c
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;
index faff44175bb32eb1982f1eaf1de70d960ae2b65c..8da5609cb686432c04cb9ebc1e0bbda273c2b90a 100644 (file)
--- a/ident.c
+++ b/ident.c
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"));
+}