summaryrefslogtreecommitdiff
path: root/builtin-checkout.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-03-21 12:51:34 -0700
committerJunio C Hamano <gitster@pobox.com>2009-03-22 23:36:47 -0700
commit431b1969fcde69959a23355fba6894fb69c8fa0c (patch)
treef8abd4ca9650a62e3b46a0e35ce083654e71bcec /builtin-checkout.c
parent91408042768c05347c1b9f081a00387ca07b26fe (diff)
downloadgit-431b1969fcde69959a23355fba6894fb69c8fa0c.tar.gz
Rename interpret/substitute nth_last_branch functions
These allow you to say "git checkout @{-2}" to switch to the branch two "branch switching" ago by pretending as if you typed the name of that branch. As it is likely that we will be introducing more short-hands to write the name of a branch without writing it explicitly, rename the functions from "nth_last_branch" to more generic "branch_name", to prepare for different semantics. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-checkout.c')
-rw-r--r--builtin-checkout.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-checkout.c b/builtin-checkout.c
index 9fdfc58d1a..a8d9d97da2 100644
--- a/builtin-checkout.c
+++ b/builtin-checkout.c
@@ -355,7 +355,7 @@ static void setup_branch_path(struct branch_info *branch)
struct strbuf buf = STRBUF_INIT;
int ret;
- if ((ret = interpret_nth_last_branch(branch->name, &buf))
+ if ((ret = interpret_branch_name(branch->name, &buf))
&& ret == strlen(branch->name)) {
branch->name = xstrdup(buf.buf);
strbuf_splice(&buf, 0, 0, "refs/heads/", 11);