mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 04:04:59 +00:00
feature: add an option in repository configuration to enable --prune
on fetch (#590)
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
a4befd010a
commit
3cbffa6ff9
12 changed files with 50 additions and 11 deletions
|
@ -40,6 +40,8 @@ namespace SourceGit.ViewModels
|
|||
{
|
||||
_repo.SetWatcherEnabled(false);
|
||||
|
||||
var notags = _repo.Settings.FetchWithoutTags;
|
||||
var prune = _repo.Settings.EnablePruneOnFetch;
|
||||
return Task.Run(() =>
|
||||
{
|
||||
if (FetchAllRemotes)
|
||||
|
@ -47,13 +49,13 @@ namespace SourceGit.ViewModels
|
|||
foreach (var remote in _repo.Remotes)
|
||||
{
|
||||
SetProgressDescription($"Fetching remote: {remote.Name}");
|
||||
new Commands.Fetch(_repo.FullPath, remote.Name, NoTags, SetProgressDescription).Exec();
|
||||
new Commands.Fetch(_repo.FullPath, remote.Name, notags, prune, SetProgressDescription).Exec();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SetProgressDescription($"Fetching remote: {SelectedRemote.Name}");
|
||||
new Commands.Fetch(_repo.FullPath, SelectedRemote.Name, NoTags, SetProgressDescription).Exec();
|
||||
new Commands.Fetch(_repo.FullPath, SelectedRemote.Name, notags, prune, SetProgressDescription).Exec();
|
||||
}
|
||||
|
||||
CallUIThread(() =>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue