X-Git-Url: https://git.uis.cam.ac.uk/x/uis/git/git.git/blobdiff_plain/9224b73be03845a99f8171c57dc282f806b70f4c..8d9c50105f908b2adde4b7c77537cf95f19cd893:/builtin/checkout.c diff --git a/builtin/checkout.c b/builtin/checkout.c index 3bb652591b..574d2b6181 100644 --- a/builtin/checkout.c +++ b/builtin/checkout.c @@ -882,7 +882,7 @@ static int parse_branchname_arg(int argc, const char **argv, new->name = arg; setup_branch_path(new); - if (check_ref_format(new->path) == CHECK_REF_FORMAT_OK && + if (!check_refname_format(new->path, 0) && resolve_ref(new->path, branch_rev, 1, NULL)) hashcpy(rev, branch_rev); else