mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 20:24:59 +00:00
Add fetch all branches on pull. (acts like fetch+pull)
This commit is contained in:
parent
7bfb684bde
commit
8a38b6afac
4 changed files with 24 additions and 1 deletions
|
@ -58,6 +58,12 @@ namespace SourceGit.ViewModels
|
|||
get => _repo.Settings.PreferRebaseInsteadOfMerge;
|
||||
set => _repo.Settings.PreferRebaseInsteadOfMerge = value;
|
||||
}
|
||||
|
||||
public bool FetchAllBranchesOnPull
|
||||
{
|
||||
get => _repo.Settings.FetchAllBranchesOnPull;
|
||||
set => _repo.Settings.FetchAllBranchesOnPull = value;
|
||||
}
|
||||
|
||||
public bool NoTags
|
||||
{
|
||||
|
@ -151,6 +157,12 @@ namespace SourceGit.ViewModels
|
|||
}
|
||||
}
|
||||
|
||||
if (FetchAllBranchesOnPull)
|
||||
{
|
||||
SetProgressDescription($"Fetching remote: {_selectedRemote.Name}...");
|
||||
new Commands.Fetch(_repo.FullPath, _selectedRemote.Name, false, NoTags, SetProgressDescription).Exec();
|
||||
}
|
||||
|
||||
SetProgressDescription($"Pull {_selectedRemote.Name}/{_selectedBranch.Name}...");
|
||||
var rs = new Commands.Pull(_repo.FullPath, _selectedRemote.Name, _selectedBranch.Name, UseRebase, NoTags, SetProgressDescription).Exec();
|
||||
if (rs && needPopStash)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue