mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-10-31 13:03:20 -07:00
fix(Repository.csClone.xaml.cs): 修复之前的更改(232165fa3eafdd0d5589963f0a26a487e7075bcf)导致Remote name 不能正常设置
This commit is contained in:
parent
ceff6ef102
commit
6125c17354
2 changed files with 9 additions and 6 deletions
|
@ -430,7 +430,14 @@ namespace SourceGit.Git {
|
|||
/// <param name="onProgress"></param>
|
||||
/// <returns></returns>
|
||||
public static Repository Clone(string url, string folder, string rName, string lName, Action<string> onProgress) {
|
||||
var errs = RunCommand(folder, $"-c credential.helper=manager clone --progress --verbose --origin {rName} --recurse-submodules {url} {lName}", line => {
|
||||
string RemoteName;
|
||||
if (rName != null) {
|
||||
RemoteName = $" --origin {rName}";
|
||||
} else {
|
||||
RemoteName = null;
|
||||
}
|
||||
|
||||
var errs = RunCommand(folder, $"-c credential.helper=manager clone --progress --verbose {RemoteName} --recurse-submodules {url} {lName}", line => {
|
||||
if (line != null) onProgress?.Invoke(line);
|
||||
}, true);
|
||||
|
||||
|
|
|
@ -87,11 +87,7 @@ namespace SourceGit.UI {
|
|||
string rName;
|
||||
if (string.IsNullOrWhiteSpace(RemoteName))
|
||||
{
|
||||
var from = RemoteUri.LastIndexOfAny(new char[] { '\\', '/' });
|
||||
if (from <= 0) return;
|
||||
|
||||
var name = RemoteUri.Substring(from + 1);
|
||||
rName = name.Replace(".git", "");
|
||||
rName = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue