diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-03-14 15:23:18 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-03-14 15:23:18 -0700 |
commit | c809496c97122b7d297e7216c3bfff7262b212e0 (patch) | |
tree | 7fc616a9cc1233b41e63ef259d6792e0e074f5f4 /refs.c | |
parent | 7c3b2034eda6cda3ef88dc4372da767b76e38bc9 (diff) | |
parent | fd4692ff7040e690546ed139a419995e76a96196 (diff) | |
download | git-c809496c97122b7d297e7216c3bfff7262b212e0.tar.gz |
Merge branch 'jk/interpret-branch-name'
"git branch @" created refs/heads/@ as a branch, and in general the
code that handled @{-1} and @{upstream} was a bit too loose in
disambiguating.
* jk/interpret-branch-name:
checkout: restrict @-expansions when finding branch
strbuf_check_ref_format(): expand only local branches
branch: restrict @-expansions when deleting
t3204: test git-branch @-expansion corner cases
interpret_branch_name: allow callers to restrict expansions
strbuf_branchname: add docstring
strbuf_branchname: drop return value
interpret_branch_name: move docstring to header file
interpret_branch_name(): handle auto-namelen for @{-1}
Diffstat (limited to 'refs.c')
-rw-r--r-- | refs.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -405,7 +405,7 @@ int refname_match(const char *abbrev_name, const char *full_name) static char *substitute_branch_name(const char **string, int *len) { struct strbuf buf = STRBUF_INIT; - int ret = interpret_branch_name(*string, *len, &buf); + int ret = interpret_branch_name(*string, *len, &buf, 0); if (ret == *len) { size_t size; |