From dcc63e187b251732d5ba7cbfdbdbd636116cd9da Mon Sep 17 00:00:00 2001 From: leo Date: Wed, 19 Jun 2024 15:36:49 +0800 Subject: [PATCH] enhance: remember the last selection of `Use rebase instead of merge` on pull for each repository (#185) --- src/ViewModels/Pull.cs | 6 +++--- src/ViewModels/Repository.cs | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/ViewModels/Pull.cs b/src/ViewModels/Pull.cs index 44287138..657f52a6 100644 --- a/src/ViewModels/Pull.cs +++ b/src/ViewModels/Pull.cs @@ -55,9 +55,9 @@ namespace SourceGit.ViewModels public bool UseRebase { - get; - set; - } = true; + get => _repo.PreferRebaseInsteadOfMerge; + set => _repo.PreferRebaseInsteadOfMerge = value; + } public Pull(Repository repo, Models.Branch specifiedRemoteBranch) { diff --git a/src/ViewModels/Repository.cs b/src/ViewModels/Repository.cs index 6dc6fb9e..ee6cd223 100644 --- a/src/ViewModels/Repository.cs +++ b/src/ViewModels/Repository.cs @@ -39,6 +39,12 @@ namespace SourceGit.ViewModels set => SetProperty(ref _gitDir, value); } + public bool PreferRebaseInsteadOfMerge + { + get; + set; + } = true; + public AvaloniaList Filters { get;