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:
@ -123,7 +123,7 @@ static int delete_branches(int argc, const char **argv, int force, int kinds)
|
||||
for (i = 0; i < argc; i++, strbuf_release(&bname)) {
|
||||
int len = strlen(argv[i]);
|
||||
|
||||
if (interpret_nth_last_branch(argv[i], &bname) != len)
|
||||
if (interpret_branch_name(argv[i], &bname) != len)
|
||||
strbuf_add(&bname, argv[i], len);
|
||||
|
||||
if (kinds == REF_LOCAL_BRANCH && !strcmp(head, bname.buf)) {
|
||||
|
Reference in New Issue
Block a user