From f3fe90b2e1dc494cb40b1347379d014085aab554 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=B6ran=20W?= <44604769+goran-w@users.noreply.github.com> Date: Sat, 24 May 2025 03:40:17 +0200 Subject: [PATCH] fix: IsConflictResolved check should not be done for submodules (#1356) A submodule conflict is not resolved until it's Staged. --- src/ViewModels/Conflict.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ViewModels/Conflict.cs b/src/ViewModels/Conflict.cs index 8c825081..e3197f8f 100644 --- a/src/ViewModels/Conflict.cs +++ b/src/ViewModels/Conflict.cs @@ -1,4 +1,6 @@ -namespace SourceGit.ViewModels +using System; + +namespace SourceGit.ViewModels { public class ConflictSourceBranch { @@ -46,7 +48,9 @@ _wc = wc; _change = change; - IsResolved = new Commands.IsConflictResolved(repo.FullPath, change).Result(); + var isSubmodule = repo.Submodules.Find(x => x.Path.Equals(change.Path, StringComparison.Ordinal)) != null; + + IsResolved = !isSubmodule && new Commands.IsConflictResolved(repo.FullPath, change).Result(); var context = wc.InProgressContext; if (context is CherryPickInProgress cherryPick)