mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 04:04:59 +00:00
code_style: move SourceGit.ViewModels.RepositorySettings
to SourceGit.Models.RepositorySettings
This commit is contained in:
parent
183cb8a658
commit
fa9990c38c
3 changed files with 96 additions and 93 deletions
91
src/Models/RepositorySettings.cs
Normal file
91
src/Models/RepositorySettings.cs
Normal file
|
@ -0,0 +1,91 @@
|
|||
using Avalonia.Collections;
|
||||
|
||||
namespace SourceGit.Models
|
||||
{
|
||||
public class RepositorySettings
|
||||
{
|
||||
public DealWithLocalChanges DealWithLocalChangesOnCheckoutBranch
|
||||
{
|
||||
get;
|
||||
set;
|
||||
} = DealWithLocalChanges.DoNothing;
|
||||
|
||||
public bool FetchWithoutTags
|
||||
{
|
||||
get;
|
||||
set;
|
||||
} = false;
|
||||
|
||||
public DealWithLocalChanges DealWithLocalChangesOnPull
|
||||
{
|
||||
get;
|
||||
set;
|
||||
} = DealWithLocalChanges.DoNothing;
|
||||
|
||||
public bool PreferRebaseInsteadOfMerge
|
||||
{
|
||||
get;
|
||||
set;
|
||||
} = true;
|
||||
|
||||
public bool FetchWithoutTagsOnPull
|
||||
{
|
||||
get;
|
||||
set;
|
||||
} = false;
|
||||
|
||||
public bool PushAllTags
|
||||
{
|
||||
get;
|
||||
set;
|
||||
} = false;
|
||||
|
||||
public DealWithLocalChanges DealWithLocalChangesOnCreateBranch
|
||||
{
|
||||
get;
|
||||
set;
|
||||
} = DealWithLocalChanges.DoNothing;
|
||||
|
||||
public bool CheckoutBranchOnCreateBranch
|
||||
{
|
||||
get;
|
||||
set;
|
||||
} = true;
|
||||
|
||||
public bool AutoStageBeforeCommit
|
||||
{
|
||||
get;
|
||||
set;
|
||||
} = false;
|
||||
|
||||
public AvaloniaList<string> Filters
|
||||
{
|
||||
get;
|
||||
set;
|
||||
} = new AvaloniaList<string>();
|
||||
|
||||
public AvaloniaList<string> CommitMessages
|
||||
{
|
||||
get;
|
||||
set;
|
||||
} = new AvaloniaList<string>();
|
||||
|
||||
public void PushCommitMessage(string message)
|
||||
{
|
||||
var existIdx = CommitMessages.IndexOf(message);
|
||||
if (existIdx == 0)
|
||||
return;
|
||||
|
||||
if (existIdx > 0)
|
||||
{
|
||||
CommitMessages.Move(existIdx, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
if (CommitMessages.Count > 9)
|
||||
CommitMessages.RemoveRange(9, CommitMessages.Count - 9);
|
||||
|
||||
CommitMessages.Insert(0, message);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue