From 54d5ac80863fa338e6bf7213f0c63d770034c379 Mon Sep 17 00:00:00 2001 From: JC-Chung <52159296+JC-Chung@users.noreply.github.com> Date: Tue, 23 Jun 2026 20:12:20 +0800 Subject: [PATCH] fix: create branch dialog not respecting stash & reapply default preference --- src/ViewModels/CreateBranch.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/ViewModels/CreateBranch.cs b/src/ViewModels/CreateBranch.cs index 8060f20f2..f180c94e9 100644 --- a/src/ViewModels/CreateBranch.cs +++ b/src/ViewModels/CreateBranch.cs @@ -77,7 +77,9 @@ public CreateBranch(Repository repo, Models.Branch branch) Name = branch.Name; BasedOn = branch; - DealWithLocalChanges = Models.DealWithLocalChanges.DoNothing; + DealWithLocalChanges = Preferences.Instance.UseStashAndReapplyByDefault ? + Models.DealWithLocalChanges.StashAndReapply : + Models.DealWithLocalChanges.DoNothing; UpdateOverrideTip(); } @@ -89,7 +91,9 @@ public CreateBranch(Repository repo, Models.Commit commit) _head = commit.SHA; BasedOn = commit; - DealWithLocalChanges = Models.DealWithLocalChanges.DoNothing; + DealWithLocalChanges = Preferences.Instance.UseStashAndReapplyByDefault ? + Models.DealWithLocalChanges.StashAndReapply : + Models.DealWithLocalChanges.DoNothing; UpdateOverrideTip(); } @@ -101,7 +105,9 @@ public CreateBranch(Repository repo, Models.Tag tag) _head = tag.SHA; BasedOn = tag; - DealWithLocalChanges = Models.DealWithLocalChanges.DoNothing; + DealWithLocalChanges = Preferences.Instance.UseStashAndReapplyByDefault ? + Models.DealWithLocalChanges.StashAndReapply : + Models.DealWithLocalChanges.DoNothing; UpdateOverrideTip(); }