From 80aa468b08b464ab044ad73562e138c95217cf52 Mon Sep 17 00:00:00 2001 From: leo Date: Mon, 9 Oct 2023 17:31:11 +0800 Subject: [PATCH] fix: allow '.' in repository name. see issue #14 --- src/Views/Validations/GitURL.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Views/Validations/GitURL.cs b/src/Views/Validations/GitURL.cs index ae34da1e..97c5671c 100644 --- a/src/Views/Validations/GitURL.cs +++ b/src/Views/Validations/GitURL.cs @@ -6,9 +6,9 @@ namespace SourceGit.Views.Validations { public class GitURL : ValidationRule { private static readonly Regex[] VALID_FORMATS = new Regex[] { - new Regex(@"^http[s]?://([\w\-]+@)?[\w\.\-]+(\:[0-9]+)?/[\w\-]+/[\w\-]+\.git$"), - new Regex(@"^[\w\-]+@[\w\.\-]+(\:[0-9]+)?:[\w\-]+/[\w\-]+\.git$"), - new Regex(@"^ssh://([\w\-]+@)?[\w\.\-]+(\:[0-9]+)?/[\w\-]+/[\w\-]+\.git$"), + new Regex(@"^http[s]?://([\w\-]+@)?[\w\.\-]+(\:[0-9]+)?/[\w\-]+/[\w\-\.]+\.git$"), + new Regex(@"^[\w\-]+@[\w\.\-]+(\:[0-9]+)?:[\w\-]+/[\w\-\.]+\.git$"), + new Regex(@"^ssh://([\w\-]+@)?[\w\.\-]+(\:[0-9]+)?/[\w\-]+/[\w\-\.]+\.git$"), }; public static bool IsSSH(string url) {