Fix incorrect ref namespace check
The reason why the trailing slash is needed is obvious. refs/stash and HEAD are not namespace, but complete refs. Do full string compare on them. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
8311158c66
commit
97ba642bcf
@ -535,7 +535,7 @@ static int add_branch_for_removal(const char *refname,
|
||||
}
|
||||
|
||||
/* don't delete non-remote-tracking refs */
|
||||
if (prefixcmp(refname, "refs/remotes")) {
|
||||
if (prefixcmp(refname, "refs/remotes/")) {
|
||||
/* advise user how to delete local branches */
|
||||
if (!prefixcmp(refname, "refs/heads/"))
|
||||
string_list_append(branches->skipped,
|
||||
|
||||
Reference in New Issue
Block a user