mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-06-16 16:05:00 +00:00
feature: support to use relative path as submodule's url when adding new submodule (#1339)
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
ece51fbd32
commit
438aa76695
3 changed files with 28 additions and 14 deletions
|
@ -50,7 +50,11 @@ namespace SourceGit.Models
|
|||
return true;
|
||||
}
|
||||
|
||||
return url.EndsWith(".git", StringComparison.Ordinal) && Directory.Exists(url);
|
||||
var localPath = url;
|
||||
if (url.StartsWith("file://", StringComparison.Ordinal))
|
||||
localPath = url.Substring(7);
|
||||
|
||||
return Directory.Exists(localPath);
|
||||
}
|
||||
|
||||
public bool TryGetVisitURL(out string url)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue