Skip to content

Commit 60cd210

Browse files
committed
fix: using theirs or mine does not work if it is deleted by ours or theirs
Signed-off-by: leo <[email protected]>
1 parent 75015d5 commit 60cd210

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/ViewModels/WorkingCopy.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,8 @@ public async void UseTheirs(List<Models.Change> changes)
388388
if (!change.IsConflicted)
389389
continue;
390390

391-
if (change.WorkTree == Models.ChangeState.Deleted)
391+
if (change.ConflictReason == Models.ConflictReason.BothDeleted ||
392+
change.ConflictReason == Models.ConflictReason.DeletedByThem)
392393
{
393394
var fullpath = Path.Combine(_repo.FullPath, change.Path);
394395
if (File.Exists(fullpath))
@@ -430,7 +431,8 @@ public async void UseMine(List<Models.Change> changes)
430431
if (!change.IsConflicted)
431432
continue;
432433

433-
if (change.Index == Models.ChangeState.Deleted)
434+
if (change.ConflictReason == Models.ConflictReason.BothDeleted ||
435+
change.ConflictReason == Models.ConflictReason.DeletedByUs)
434436
{
435437
var fullpath = Path.Combine(_repo.FullPath, change.Path);
436438
if (File.Exists(fullpath))

0 commit comments

Comments
 (0)