<feature>: add support for ssh:// protocol in git repository URL

This commit is contained in:
sourcegit-scm 2023-05-22 18:30:25 +08:00 committed by GitHub
parent 079f1a78bc
commit 36e682d429
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -11,7 +11,8 @@ namespace SourceGit.Views.Validations {
&& (url.StartsWith("http://", StringComparison.Ordinal) && (url.StartsWith("http://", StringComparison.Ordinal)
|| url.StartsWith("https://", StringComparison.Ordinal) || url.StartsWith("https://", StringComparison.Ordinal)
|| url.StartsWith("git@", StringComparison.Ordinal) || url.StartsWith("git@", StringComparison.Ordinal)
|| url.StartsWith("file://", StringComparison.Ordinal)); || url.StartsWith("file://", StringComparison.Ordinal)
|| url.StartsWith("ssh://", StringComparison.Ordinal));
return valid ? ValidationResult.ValidResult : new ValidationResult(false, App.Text("BadRemoteUri")); return valid ? ValidationResult.ValidResult : new ValidationResult(false, App.Text("BadRemoteUri"));
} }
} }