mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-21 21:30:37 +08:00
feature: remember --force check state in git fetch popup (#824)
This commit is contained in:
@@ -26,6 +26,12 @@ namespace SourceGit.Models
|
||||
set;
|
||||
} = false;
|
||||
|
||||
public bool EnableForceOnFetch
|
||||
{
|
||||
get;
|
||||
set;
|
||||
} = false;
|
||||
|
||||
public bool FetchWithoutTags
|
||||
{
|
||||
get;
|
||||
|
||||
@@ -30,15 +30,14 @@ namespace SourceGit.ViewModels
|
||||
|
||||
public bool Force
|
||||
{
|
||||
get;
|
||||
set;
|
||||
get => _repo.Settings.EnableForceOnFetch;
|
||||
set => _repo.Settings.EnableForceOnFetch = value;
|
||||
}
|
||||
|
||||
public Fetch(Repository repo, Models.Remote preferedRemote = null)
|
||||
{
|
||||
_repo = repo;
|
||||
_fetchAllRemotes = preferedRemote == null;
|
||||
Force = false;
|
||||
SelectedRemote = preferedRemote != null ? preferedRemote : _repo.Remotes[0];
|
||||
View = new Views.Fetch() { DataContext = this };
|
||||
}
|
||||
@@ -49,7 +48,7 @@ namespace SourceGit.ViewModels
|
||||
|
||||
var notags = _repo.Settings.FetchWithoutTags;
|
||||
var prune = _repo.Settings.EnablePruneOnFetch;
|
||||
var force = Force;
|
||||
var force = _repo.Settings.EnableForceOnFetch;
|
||||
return Task.Run(() =>
|
||||
{
|
||||
if (FetchAllRemotes)
|
||||
|
||||
Reference in New Issue
Block a user