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>
This commit is contained in:
Junio C Hamano
2009-03-21 12:51:34 -07:00
parent 9140804276
commit 431b1969fc
6 changed files with 11 additions and 11 deletions

View File

@ -137,7 +137,7 @@ void create_branch(const char *head,
int len;
len = strlen(name);
if (interpret_nth_last_branch(name, &ref) != len) {
if (interpret_branch_name(name, &ref) != len) {
strbuf_reset(&ref);
strbuf_add(&ref, name, len);
}