mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2025-01-11 23:57:21 -08:00
feature: remember --force
check state in git fetch
popup (#824)
This commit is contained in:
parent
39dff8a93f
commit
cb3727b524
2 changed files with 9 additions and 4 deletions
|
@ -26,6 +26,12 @@ namespace SourceGit.Models
|
||||||
set;
|
set;
|
||||||
} = false;
|
} = false;
|
||||||
|
|
||||||
|
public bool EnableForceOnFetch
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
set;
|
||||||
|
} = false;
|
||||||
|
|
||||||
public bool FetchWithoutTags
|
public bool FetchWithoutTags
|
||||||
{
|
{
|
||||||
get;
|
get;
|
||||||
|
|
|
@ -30,15 +30,14 @@ namespace SourceGit.ViewModels
|
||||||
|
|
||||||
public bool Force
|
public bool Force
|
||||||
{
|
{
|
||||||
get;
|
get => _repo.Settings.EnableForceOnFetch;
|
||||||
set;
|
set => _repo.Settings.EnableForceOnFetch = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Fetch(Repository repo, Models.Remote preferedRemote = null)
|
public Fetch(Repository repo, Models.Remote preferedRemote = null)
|
||||||
{
|
{
|
||||||
_repo = repo;
|
_repo = repo;
|
||||||
_fetchAllRemotes = preferedRemote == null;
|
_fetchAllRemotes = preferedRemote == null;
|
||||||
Force = false;
|
|
||||||
SelectedRemote = preferedRemote != null ? preferedRemote : _repo.Remotes[0];
|
SelectedRemote = preferedRemote != null ? preferedRemote : _repo.Remotes[0];
|
||||||
View = new Views.Fetch() { DataContext = this };
|
View = new Views.Fetch() { DataContext = this };
|
||||||
}
|
}
|
||||||
|
@ -49,7 +48,7 @@ namespace SourceGit.ViewModels
|
||||||
|
|
||||||
var notags = _repo.Settings.FetchWithoutTags;
|
var notags = _repo.Settings.FetchWithoutTags;
|
||||||
var prune = _repo.Settings.EnablePruneOnFetch;
|
var prune = _repo.Settings.EnablePruneOnFetch;
|
||||||
var force = Force;
|
var force = _repo.Settings.EnableForceOnFetch;
|
||||||
return Task.Run(() =>
|
return Task.Run(() =>
|
||||||
{
|
{
|
||||||
if (FetchAllRemotes)
|
if (FetchAllRemotes)
|
||||||
|
|
Loading…
Reference in a new issue