fix: using theirs or mine does not work if it is deleted by ours or theirs

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2025-05-30 11:13:29 +08:00
parent 75015d550c
commit 60cd210b80
No known key found for this signature in database

View file

@ -388,7 +388,8 @@ namespace SourceGit.ViewModels
if (!change.IsConflicted)
continue;
if (change.WorkTree == Models.ChangeState.Deleted)
if (change.ConflictReason == Models.ConflictReason.BothDeleted ||
change.ConflictReason == Models.ConflictReason.DeletedByThem)
{
var fullpath = Path.Combine(_repo.FullPath, change.Path);
if (File.Exists(fullpath))
@ -430,7 +431,8 @@ namespace SourceGit.ViewModels
if (!change.IsConflicted)
continue;
if (change.Index == Models.ChangeState.Deleted)
if (change.ConflictReason == Models.ConflictReason.BothDeleted ||
change.ConflictReason == Models.ConflictReason.DeletedByUs)
{
var fullpath = Path.Combine(_repo.FullPath, change.Path);
if (File.Exists(fullpath))