summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: eff7375)
raw | patch | inline | side by side (parent: eff7375)
author | Shawn O. Pearce <spearce@spearce.org> | |
Thu, 28 Dec 2006 07:35:20 +0000 (02:35 -0500) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Fri, 29 Dec 2006 03:06:16 +0000 (19:06 -0800) |
To permit the get_ref function to use the static better_branch_name
function to generate a string on demand I'm moving it up earlier.
The actual logic was not affected in this change.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
function to generate a string on demand I'm moving it up earlier.
The actual logic was not affected in this change.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
merge-recursive.c | patch | blob | history |
diff --git a/merge-recursive.c b/merge-recursive.c
index ca4f19e34d4216fed7c8110ba8f75585c69f92c7..1c84ed78f2449a1d1ac078700ec7eeccbee45ab2 100644 (file)
--- a/merge-recursive.c
+++ b/merge-recursive.c
return clean;
}
+static const char *better_branch_name(const char *branch)
+{
+ static char githead_env[8 + 40 + 1];
+ char *name;
+
+ if (strlen(branch) != 40)
+ return branch;
+ sprintf(githead_env, "GITHEAD_%s", branch);
+ name = getenv(githead_env);
+ return name ? name : branch;
+}
+
static struct commit *get_ref(const char *ref)
{
unsigned char sha1[20];
return (struct commit *)object;
}
-static const char *better_branch_name(const char *branch)
-{
- static char githead_env[8 + 40 + 1];
- char *name;
-
- if (strlen(branch) != 40)
- return branch;
- sprintf(githead_env, "GITHEAD_%s", branch);
- name = getenv(githead_env);
- return name ? name : branch;
-}
-
int main(int argc, char *argv[])
{
static const char *bases[2];