Skip to content

[business-logic] conflict_detect.go unclosed conflict region formats as 'lines N-0' #827

Description

@topcheer

File: internal/tool/conflict_detect.go L89-99 + L126-129.

Executed proof: input with '<<<<<<< HEAD' and no closing '>>>>>>>' yields region {StartLine:2, EndLine:0} and warning text 'unresolved merge conflict (lines 2-0) ... HEAD vs (unknown)'. Detection still works but the range is self-contradictory and the unclosed state is not surfaced.

Impact: Low - output clarity.
Fix: render 'line N (unclosed conflict marker)' when EndLine==0.
Verified by independent re-review with executed repro.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions