Skip to content

Implement three-way tree merge for forge ref conflict resolution #19

@joeycarpinelli

Description

@joeycarpinelli

The design doc specifies that sync conflicts should be resolved via three-way tree merge, not force-fetch overwrite.\n\nAfter removing the + from the fetch refspec (fixes #6 — force-fetch issue), fetched refs that diverge from local state are left unmerged. The daemon (or git forge sync) should:\n\n1. Attempt a three-way tree merge on entity refs (issues, reviews). Because entity fields are separate blobs, edits to different fields by different authors merge cleanly.\n2. Fall back to last-write-wins (keep remote, discard local, notify user with discarded content) when the merge fails (e.g. both sides changed the title).\n3. Auto-merge metadata refs (comments, approvals, links) via three-way tree merge — these rarely conflict due to unique entry paths.\n\nReference: design doc §Conflict Resolution and §Metadata Push and Auto-Merge.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions