diff options
Diffstat (limited to 'transport.c')
-rw-r--r-- | transport.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/transport.c b/transport.c index fa279d531f..feb2ff51bc 100644 --- a/transport.c +++ b/transport.c @@ -754,18 +754,10 @@ void transport_verify_remote_names(int nr_heads, const char **heads) continue; remote = remote ? (remote + 1) : local; - switch (check_ref_format(remote)) { - case 0: /* ok */ - case CHECK_REF_FORMAT_ONELEVEL: - /* ok but a single level -- that is fine for - * a match pattern. - */ - case CHECK_REF_FORMAT_WILDCARD: - /* ok but ends with a pattern-match character */ - continue; - } - die("remote part of refspec is not a valid name in %s", - heads[i]); + if (check_refname_format(remote, + REFNAME_ALLOW_ONELEVEL|REFNAME_REFSPEC_PATTERN)) + die("remote part of refspec is not a valid name in %s", + heads[i]); } } |