Skip to content

Commit

Permalink
Fix status for splitted conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
yairchu committed Nov 23, 2024
1 parent 5950a47 commit 6527953
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 7 additions & 5 deletions src/Resolution.hs
Original file line number Diff line number Diff line change
Expand Up @@ -165,15 +165,17 @@ resolveContent opts =
go (Left line) = NewContent mempty (unlines [line])
go (Right conflict)
| opts.splitMarkers =
r <> splitProgress
NewContent
{ newContent = r.newContent
, result =
if r.result.failedToResolve + r.result.reducedConflicts > 0
then mempty {reducedConflicts = 1} -- The split is a reduction
else mempty {resolvedSuccessfully = 1}
}
| otherwise = resolve conflict
where
s = splitConflict conflict
r = foldMap resolve s
splitProgress =
case s of
(_:_:_) -> NewContent (Result 0 1 0) mempty
_ -> mempty
resolve conflict =
formatResolution $ resolveConflict opts $
(if opts.lineEndings then lineBreakFix else id) $
Expand Down
2 changes: 1 addition & 1 deletion stack.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
flags: {}
packages:
- '.'
resolver: lts-22.41
resolver: lts-22.42

0 comments on commit 6527953

Please sign in to comment.