Skip to content

Add Concurrent-Edit trailer to merge commits #132

@remenoscodes

Description

@remenoscodes

When git-issue-merge resolves a diverged ref where both sides modified the same scalar field, record the concurrent edit in the merge commit.

Proposed trailer format:
Concurrent-Edit: (local: , remote: , resolved: )

Example:
Concurrent-Edit: Priority (local: high, remote: critical, resolved: critical)

Implementation: In resolve_scalar() at bin/git-issue-merge:139, when both sides changed (the 'Both changed' branch), emit a Concurrent-Edit trailer on the merge commit in addition to the resolved value.

This is backward-compatible: tools that don't understand Concurrent-Edit ignore it per the spec's unknown-trailer rule.

Benefits:

  • UIs can surface 'this field was contested during merge' warnings
  • git issue log can show concurrent edit history
  • Addresses the main criticism from the HN discussion about silent data loss in LWW

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions