This makes the functionality of ident.c::get_ident() available to
other callers.
Signed-off-by: Junio C Hamano <junkio@cox.net>
---
* This by itself is totally uninteresting, but the second one
depends on it.
cache.h | 1 +
ident.c | 8 ++++----
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/cache.h b/cache.h
index 201704b..38a9bc0 100644
--- a/cache.h
+++ b/cache.h
@@ -321,6 +321,7 @@ unsigned long approxidate(const char *);
extern const char *git_author_info(int);
extern const char *git_committer_info(int);
+extern const char *fmt_ident(const char *name, const char *email, const char *date_str, int);
struct checkout {
const char *base_dir;
diff --git a/ident.c b/ident.c
index a6fc7b5..bb03bdd 100644
--- a/ident.c
+++ b/ident.c
@@ -185,8 +185,8 @@ static const char *env_hint =
"Add --global to set your account\'s default\n"
"\n";
-static const char *get_ident(const char *name, const char *email,
- const char *date_str, int error_on_no_name)
+const char *fmt_ident(const char *name, const char *email,
+ const char *date_str, int error_on_no_name)
{
static char buffer[1000];
char date[50];
@@ -233,7 +233,7 @@ static const char *get_ident(const char *name, const char *email,
const char *git_author_info(int error_on_no_name)
{
- return get_ident(getenv("GIT_AUTHOR_NAME"),
+ return fmt_ident(getenv("GIT_AUTHOR_NAME"),
getenv("GIT_AUTHOR_EMAIL"),
getenv("GIT_AUTHOR_DATE"),
error_on_no_name);
@@ -241,7 +241,7 @@ const char *git_author_info(int error_on_no_name)
const char *git_committer_info(int error_on_no_name)
{
- return get_ident(getenv("GIT_COMMITTER_NAME"),
+ return fmt_ident(getenv("GIT_COMMITTER_NAME"),
getenv("GIT_COMMITTER_EMAIL"),
getenv("GIT_COMMITTER_DATE"),
error_on_no_name);
--
1.5.0.rc3.40.g1f7d
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
| Linus Torvalds | Linux 2.6.27-rc5 |
| Linus Torvalds | Linux 2.6.27-rc8 |
| Tomasz Kłoczko | Is it time for remove (crap) ALSA from kernel tree ? |
| Linus Torvalds | Linux v2.6.27-rc1 |
git: | |
| Pierre Habouzit | git push (mis ?)behavior |
| Linus Torvalds | Re: Something is broken in repack |
| Michael J Gruber | gitignore: negating path patterns |
| Steven Grimm | StGIT vs. guilt: What's the difference? |
| Markus Wernig | host to host ipsec link |
| Richard Stallman | Re: Real men don't attack straw men |
| Kevin Neff | Patching a SSH 'Weakness' |
| Jeffrey 'jf' Lim | "VIA Announces Strategic Open Source Driver Development Initiative" |
| Denys Fedoryshchenko | panic 2.6.27-rc3-git2, qdisc_dequeue_head |
| Evgeniy Polyakov | [resend take 2 4/4] DST Makefile/Kconfig files. |
| Volker Armin Hemmann | build error with 2.6.27.6+reiser4+ehci-hub patch. ERROR: "mii_ethtool_gset" [drive... |
| Arkadiusz Miskiewicz | htb and UDP packages bigger than 1500 |
| Why does uClinux 2.6.18 bootup block SuperIO UART IRQs that BIOS configured | 2 minutes ago | Linux kernel |
| USB statistics | 1 hour ago | Linux kernel |
| Block Sub System query | 5 hours ago | Linux kernel |
| kernel module to intercept socket creation | 6 hours ago | Linux kernel |
| Image size changing during each build | 7 hours ago | Linux kernel |
| Soft lock bug | 12 hours ago | Linux kernel |
| sysctl - dynamic registration problem | 18 hours ago | Linux kernel |
| Question on swap as ramdisk partition | 20 hours ago | Linux kernel |
| serial driver xmit problem | 1 day ago | Linux kernel |
| Generic Netlink subsytem | 1 day ago | Linux kernel |
