Allow 3-character branch names (Closes #1803)

This commit is contained in:
Gregory Schier committed 2019-11-26 13:40:54 -05:00
1 parent 42e198bf75
commit c9f80816a1
1 file changed
+5 -2
+5 -2
View File
@@ -180,8 +180,11 @@ export default class VCS {
}
static validateBranchName(branchName: string): string {
if (!branchName.match(/^[a-zA-Z0-9][a-zA-Z0-9-_.]{3,}$/)) {
return 'Branch names can only contain letters, numbers, - and _';
if (!branchName.match(/^[a-zA-Z0-9][a-zA-Z0-9-_.]{2,}$/)) {
return (
'Branch names must be at least 3 characters long and can only contain ' +
'letters, numbers, - and _'
);
}
return '';