2024-07-22 23:52:25 -07:00
|
|
|
|
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;
|
|
|
|
|
|
2024-07-27 02:52:01 -07:00
|
|
|
|
public bool FetchAllBranchesOnPull
|
|
|
|
|
{
|
|
|
|
|
get;
|
|
|
|
|
set;
|
2024-07-27 05:35:19 -07:00
|
|
|
|
} = true;
|
2024-07-27 02:52:01 -07:00
|
|
|
|
|
2024-07-22 23:52:25 -07:00
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|