mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 04:34:59 +00:00
enhance: supports default remote in Pull
if current branch has no upstream (#534)
This commit is contained in:
parent
d746e352a7
commit
a59600ce18
1 changed files with 13 additions and 2 deletions
|
@ -95,7 +95,18 @@ namespace SourceGit.ViewModels
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_selectedRemote = autoSelectedRemote ?? repo.Remotes[0];
|
if (autoSelectedRemote == null)
|
||||||
|
{
|
||||||
|
var remote = null as Models.Remote;
|
||||||
|
if (!string.IsNullOrEmpty(_repo.Settings.DefaultRemote))
|
||||||
|
remote = _repo.Remotes.Find(x => x.Name == _repo.Settings.DefaultRemote);
|
||||||
|
_selectedRemote = remote ?? _repo.Remotes[0];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_selectedRemote = autoSelectedRemote;
|
||||||
|
}
|
||||||
|
|
||||||
PostRemoteSelected();
|
PostRemoteSelected();
|
||||||
HasSpecifiedRemoteBranch = false;
|
HasSpecifiedRemoteBranch = false;
|
||||||
}
|
}
|
||||||
|
@ -132,7 +143,7 @@ namespace SourceGit.ViewModels
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var rs = false;
|
bool rs;
|
||||||
if (FetchAllBranches)
|
if (FetchAllBranches)
|
||||||
{
|
{
|
||||||
SetProgressDescription($"Fetching remote: {_selectedRemote.Name}...");
|
SetProgressDescription($"Fetching remote: {_selectedRemote.Name}...");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue