mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-11-01 13:13:21 -07:00
fix<GitURL>: fix parse repository's SSH URL
This commit is contained in:
parent
dfc452b2a6
commit
fc43edb6d2
2 changed files with 2 additions and 2 deletions
|
@ -14,7 +14,7 @@ namespace SourceGit.Views {
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class Clone : Controls.Window {
|
public partial class Clone : Controls.Window {
|
||||||
private static readonly Regex[] SSH_PROTOCOAL = new Regex[] {
|
private static readonly Regex[] SSH_PROTOCOAL = new Regex[] {
|
||||||
new Regex(@"[\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(@"^ssh://([\w\-]+@)?[\w\.\-]+(\:[0-9]+)?/[\w\-]+/[\w\-]+\.git$"),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ namespace SourceGit.Views.Validations {
|
||||||
public class GitURL : ValidationRule {
|
public class GitURL : ValidationRule {
|
||||||
private static readonly Regex[] VALID_FORMATS = new Regex[] {
|
private static readonly Regex[] VALID_FORMATS = new Regex[] {
|
||||||
new Regex(@"^http[s]?://[\w\.\-]+(\:[0-9]+)?/[\w\-]+/[\w\-]+\.git$"),
|
new Regex(@"^http[s]?://[\w\.\-]+(\:[0-9]+)?/[\w\-]+/[\w\-]+\.git$"),
|
||||||
new Regex(@"[\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(@"^ssh://([\w\-]+@)?[\w\.\-]+(\:[0-9]+)?/[\w\-]+/[\w\-]+\.git$"),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue