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:
leo 2024-10-30 18:39:38 +08:00
parent a4befd010a
commit 3cbffa6ff9
No known key found for this signature in database
12 changed files with 50 additions and 11 deletions

View file

@ -67,6 +67,12 @@ namespace SourceGit.ViewModels
set => _repo.Settings.EnableSignOffForCommit = value;
}
public bool EnablePruneOnFetch
{
get => _repo.Settings.EnablePruneOnFetch;
set => _repo.Settings.EnablePruneOnFetch = value;
}
public bool EnableAutoFetch
{
get => _repo.Settings.EnableAutoFetch;
@ -134,7 +140,7 @@ namespace SourceGit.ViewModels
AvailableOpenAIServices.Add(service.Name);
if (AvailableOpenAIServices.IndexOf(PreferedOpenAIService) == -1)
PreferedOpenAIService = "---";
PreferedOpenAIService = "---";
_cached = new Commands.Config(repo.FullPath).ListAll();
if (_cached.TryGetValue("user.name", out var name))