-
Notifications
You must be signed in to change notification settings - Fork 0
Implement three-way tree merge for forge ref conflict resolution #19
Description
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.