summaryrefslogtreecommitdiff
path: root/fast-import.c
diff options
context:
space:
mode:
Diffstat (limited to 'fast-import.c')
-rw-r--r--fast-import.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fast-import.c b/fast-import.c
index b28f90dc22..7e136a616e 100644
--- a/fast-import.c
+++ b/fast-import.c
@@ -524,8 +524,12 @@ static struct branch *new_branch(const char *name)
if (b)
die("Invalid attempt to create duplicate branch: %s", name);
- if (check_ref_format(name))
+ switch (check_ref_format(name)) {
+ case 0: break; /* its valid */
+ case -2: break; /* valid, but too few '/', allow anyway */
+ default:
die("Branch name doesn't conform to GIT standards: %s", name);
+ }
b = pool_calloc(1, sizeof(struct branch));
b->name = pool_strdup(name);