mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-11-01 13:13:21 -07:00
enhance: a more adaptable regular expression for remote URLs (#149)
This commit is contained in:
parent
3160f1d142
commit
1161738df9
1 changed files with 3 additions and 3 deletions
|
@ -4,11 +4,11 @@ namespace SourceGit.Models
|
||||||
{
|
{
|
||||||
public partial class Remote
|
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();
|
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();
|
private static partial Regex REG_SSH1();
|
||||||
[GeneratedRegex(@"^ssh://([\w\-]+@)?[\w\.\-]+(\:[0-9]+)?/[\w\-/]+/[\w\-\.]+\.git$")]
|
[GeneratedRegex(@"^ssh://([\w\-]+@)?[\w\.\-]+(\:[0-9]+)?/[\w\-/]+/[\w\-\.]+(\.git)?$")]
|
||||||
private static partial Regex REG_SSH2();
|
private static partial Regex REG_SSH2();
|
||||||
|
|
||||||
private static readonly Regex[] URL_FORMATS = [
|
private static readonly Regex[] URL_FORMATS = [
|
||||||
|
|
Loading…
Reference in a new issue