".git" extension is not allowed on the end of the repository name since it confuses the git protocol

This commit is contained in:
Eduard Heimbuch
2020-08-05 15:57:22 +02:00
parent 592282eb0f
commit 50f60a6993
2 changed files with 5 additions and 1 deletions

View File

@@ -24,7 +24,7 @@
import { validation } from "@scm-manager/ui-components";
const nameRegex = /(?!^\.\.$)(?!^\.$)(?!.*[\\\[\]])^[A-Za-z0-9\.][A-Za-z0-9\.\-_]*$/;
const nameRegex = /(?!^\.\.$)(?!^\.$)(?!.*[.]git$)(?!.*[\\\[\]])^[A-Za-z0-9\.][A-Za-z0-9\.\-_]*$/;
export const isNameValid = (name: string) => {
return nameRegex.test(name);