From 5199fb2b74e90936d062253cc6737f249c9a3932 Mon Sep 17 00:00:00 2001 From: leo Date: Fri, 28 Feb 2025 22:14:21 +0800 Subject: [PATCH] enhance: do NOT remember the last selected handling method of uncommitted local changes (#977) Signed-off-by: leo --- src/Models/RepositorySettings.cs | 18 ------------------ src/ViewModels/Checkout.cs | 6 +++--- src/ViewModels/CreateBranch.cs | 6 +++--- src/ViewModels/Pull.cs | 6 +++--- 4 files changed, 9 insertions(+), 27 deletions(-) diff --git a/src/Models/RepositorySettings.cs b/src/Models/RepositorySettings.cs index 44742fb8..08bf48ca 100644 --- a/src/Models/RepositorySettings.cs +++ b/src/Models/RepositorySettings.cs @@ -50,12 +50,6 @@ namespace SourceGit.Models set; } = true; - public DealWithLocalChanges DealWithLocalChangesOnCheckoutBranch - { - get; - set; - } = DealWithLocalChanges.DoNothing; - public bool EnableForceOnFetch { get; @@ -68,12 +62,6 @@ namespace SourceGit.Models set; } = false; - public DealWithLocalChanges DealWithLocalChangesOnPull - { - get; - set; - } = DealWithLocalChanges.DoNothing; - public bool PreferRebaseInsteadOfMerge { get; @@ -116,12 +104,6 @@ namespace SourceGit.Models set; } = false; - public DealWithLocalChanges DealWithLocalChangesOnCreateBranch - { - get; - set; - } = DealWithLocalChanges.DoNothing; - public bool CheckoutBranchOnCreateBranch { get; diff --git a/src/ViewModels/Checkout.cs b/src/ViewModels/Checkout.cs index fd84682a..9376741d 100644 --- a/src/ViewModels/Checkout.cs +++ b/src/ViewModels/Checkout.cs @@ -11,9 +11,9 @@ namespace SourceGit.ViewModels public Models.DealWithLocalChanges PreAction { - get => _repo.Settings.DealWithLocalChangesOnCheckoutBranch; - set => _repo.Settings.DealWithLocalChangesOnCheckoutBranch = value; - } + get; + set; + } = Models.DealWithLocalChanges.DoNothing; public Checkout(Repository repo, string branch) { diff --git a/src/ViewModels/CreateBranch.cs b/src/ViewModels/CreateBranch.cs index a9698a07..01bff031 100644 --- a/src/ViewModels/CreateBranch.cs +++ b/src/ViewModels/CreateBranch.cs @@ -21,9 +21,9 @@ namespace SourceGit.ViewModels public Models.DealWithLocalChanges PreAction { - get => _repo.Settings.DealWithLocalChangesOnCreateBranch; - set => _repo.Settings.DealWithLocalChangesOnCreateBranch = value; - } + get; + set; + } = Models.DealWithLocalChanges.DoNothing; public bool CheckoutAfterCreated { diff --git a/src/ViewModels/Pull.cs b/src/ViewModels/Pull.cs index 52f98d87..755b58f4 100644 --- a/src/ViewModels/Pull.cs +++ b/src/ViewModels/Pull.cs @@ -40,9 +40,9 @@ namespace SourceGit.ViewModels public Models.DealWithLocalChanges PreAction { - get => _repo.Settings.DealWithLocalChangesOnPull; - set => _repo.Settings.DealWithLocalChangesOnPull = value; - } + get; + set; + } = Models.DealWithLocalChanges.DoNothing; public bool UseRebase {