8000 fix: IsConflictResolved check should not be done for submodules (#1356) · sourcegit-scm/sourcegit@f3fe90b · GitHub
[go: up one dir, main page]

Skip to content

Commit f3fe90b

Browse files
authored
fix: IsConflictResolved check should not be done for submodules (#1356)
A submodule conflict is not resolved until it's Staged.
1 parent e28b75b commit f3fe90b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/ViewModels/Conflict.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
namespace SourceGit.ViewModels
1+
using System;
2+
3+
namespace SourceGit.ViewModels
24
{
35
public class ConflictSourceBranch
46
{
@@ -46,7 +48,9 @@ public Conflict(Repository repo, WorkingCopy wc, Models.Change change)
4648
_wc = wc;
4749
_change = change;
4850

49-
IsResolved = new Commands.IsConflictResolved(repo.FullPath, change).Result();
51+
var isSubmodule = repo.Submodules.Find(x => x.Path.Equals(change.Path, StringComparison.Ordinal)) != null;
52+
53+
IsResolved = !isSubmodule && new Commands.IsConflictResolved(repo.FullPath, change).Result();
5054

5155
var context = wc.InProgressContext;
5256
if (context is CherryPickInProgress cherryPick)

0 commit comments

Comments
 (0)
0