mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-25 11:24:02 +08:00
feature: supports to use relative path in remote URL (#1339)
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
@@ -34,17 +34,10 @@ namespace SourceGit.ViewModels
|
||||
|
||||
public static ValidationResult ValidateURL(string url, ValidationContext ctx)
|
||||
{
|
||||
if (ctx.ObjectInstance is AddSubmodule)
|
||||
{
|
||||
if (!Models.Remote.IsValidURL(url) &&
|
||||
!url.StartsWith("./", StringComparison.Ordinal) &&
|
||||
!url.StartsWith("../", StringComparison.Ordinal))
|
||||
return new ValidationResult("Invalid repository URL format");
|
||||
|
||||
return ValidationResult.Success;
|
||||
}
|
||||
|
||||
return new ValidationResult("Missing validation context");
|
||||
if (!Models.Remote.IsValidURL(url))
|
||||
return new ValidationResult("Invalid repository URL format");
|
||||
|
||||
return ValidationResult.Success;
|
||||
}
|
||||
|
||||
public override Task<bool> Sure()
|
||||
|
||||
Reference in New Issue
Block a user