Git development
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: Linus Torvalds <torvalds@osdl.org>
Cc: <git@vger.kernel.org>
Subject: [PATCH 1/6] Move git_author_info and git_commiter_info to ident.c
Date: Thu, 14 Jul 2005 18:50:33 -0600	[thread overview]
Message-ID: <m1slygyjs6.fsf@ebiederm.dsl.xmission.com> (raw)


Moving these functions allows all of the logic for figuring out what
these values are to be shared between programs.
---

 cache.h       |    2 ++
 commit-tree.c |   10 ----------
 ident.c       |   10 ++++++++++
 3 files changed, 12 insertions(+), 10 deletions(-)

c6f1b65729df142a8968441ca441f6b69926127a
diff --git a/cache.h b/cache.h
--- a/cache.h
+++ b/cache.h
@@ -223,6 +223,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
--- 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
--- a/ident.c
+++ b/ident.c
@@ -136,3 +136,13 @@ char *get_ident(const char *name, const 
 	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"));
+}

                 reply	other threads:[~2005-07-15  0:51 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m1slygyjs6.fsf@ebiederm.dsl.xmission.com \
    --to=ebiederm@xmission.com \
    --cc=git@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox