From 7c253637fc84a45ae311e4e45e6de76f310a813e Mon Sep 17 00:00:00 2001 From: leo Date: Fri, 18 Oct 2024 18:02:40 +0800 Subject: [PATCH] enhance: supports escaped remote url (#575) --- src/Models/Remote.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Models/Remote.cs b/src/Models/Remote.cs index 2aa69cb5..dcf30ddc 100644 --- a/src/Models/Remote.cs +++ b/src/Models/Remote.cs @@ -5,9 +5,9 @@ namespace SourceGit.Models { public partial class Remote { - [GeneratedRegex(@"^http[s]?://([\w\-]+@)?[\w\.\-]+(\:[0-9]+)?/[\w\-/~]+/[\w\-\.]+(\.git)?$")] + [GeneratedRegex(@"^http[s]?://([\w\-]+@)?[\w\.\-]+(\:[0-9]+)?/[\w\-/~%]+/[\w\-\.%]+(\.git)?$")] private static partial Regex REG_HTTPS(); - [GeneratedRegex(@"^[\w\-]+@[\w\.\-]+(\:[0-9]+)?:[\w\-/~]+/[\w\-\.]+(\.git)?$")] + [GeneratedRegex(@"^[\w\-]+@[\w\.\-]+(\:[0-9]+)?:[\w\-/~%]+/[\w\-\.%]+(\.git)?$")] private static partial Regex REG_SSH1(); [GeneratedRegex(@"^ssh://([\w\-]+@)?[\w\.\-]+(\:[0-9]+)?/[\w\-/~]+/[\w\-\.]+(\.git)?$")] private static partial Regex REG_SSH2();