feature: show conflict reason

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2025-05-28 14:20:31 +08:00
parent 3437f5f4a9
commit fbc8edcc13
No known key found for this signature in database
4 changed files with 108 additions and 4 deletions

View file

@ -22,6 +22,18 @@ namespace SourceGit.Models
Conflicted,
}
public enum ConflictReason
{
None,
BothDeleted,
AddedByUs,
DeletedByThem,
AddedByThem,
DeletedByUs,
BothAdded,
BothModified,
}
public class ChangeDataForAmend
{
public string FileMode { get; set; } = "";
@ -36,6 +48,8 @@ namespace SourceGit.Models
public string Path { get; set; } = "";
public string OriginalPath { get; set; } = "";
public ChangeDataForAmend DataForAmend { get; set; } = null;
public ConflictReason ConflictReason { get; set; } = ConflictReason.None;
public bool IsSubmodule { get; set; } = false;
public bool IsConflicted => WorkTree == ChangeState.Conflicted;
public void Set(ChangeState index, ChangeState workTree = ChangeState.None)