Re: [PATCH 1/7] submodule--helper: add valid-label-name

2016-05-10 Thread Junio C Hamano
Stefan Beller writes: > +static int submodule_valid_label_name(const char *label) > +{ > + if (!label || !strlen(label)) > + return 0; > + > + if (!isalnum(*label)) > + return 0; I'd limit this one to isalpha() if I were doing this to make the restriction similar

[PATCH 1/7] submodule--helper: add valid-label-name

2016-05-10 Thread Stefan Beller
We could allow more than just alphanumeric and dash characters for submodule labels. As a precaution we'll first allow only this subset and later on we can extend it once we have more experience with them. Signed-off-by: Stefan Beller --- builtin/submodule--helper.c | 30 +++