phillip.wood123@xxxxxxxxx writes: > ... Given that "git remote > set-branches" has only ever supported "real" branch names and patterns > on the command line and no-one has complained I wonder if we're better > off doing something like > > if (strbuf_check_branch_ref(&buf, branch_name) || > strcmp(buf.buf + 11, branch_name)) > error(_("invalid branch name '%s'", branch_name)); > > where the "buf.buf + 11" skips "refs/heads/" Yeah, replacing +11 with skip_prefix() or something for readability, such a check might be good enough in pracrice. Thanks.