Documentation
¶
Overview ¶
Package merge resolves concurrent edits to a ticket field by field.
Git merges text line by line, which is wrong for this format in a specific and common way: when two people move the same ticket, both sides rewrite the same `status:` line and git reports a conflict on the single most frequent operation the whole system performs. Union-merging the file instead would produce two `status:` lines — invalid YAML rather than a resolved value.
So the merge is structural. Lists union, `status` resolves by how far along the lane sequence each side got, other scalars resolve by recency, and only a genuine overlap in prose is escalated to a human — scoped to the field that actually conflicts rather than the whole ticket.
The trade-off worth naming: this is the one place jaira does something non-obvious to a repository, since git has to be told the driver exists. That registration is visible rather than silent, and it buys the property the whole storage model depends on.
Index ¶
Constants ¶
const FieldConflicts = "merge-conflicts"
FieldConflicts names the frontmatter key listing fields left unresolved.
Variables ¶
This section is empty.
Functions ¶
func RenderConflicts ¶
RenderConflicts describes what a human needs to resolve, scoped to the fields that actually clashed rather than dumping the whole file.
Types ¶
type Result ¶
type Result struct {
// Merged is the resulting file content.
Merged []byte
// Conflicts is empty on a clean merge.
Conflicts []Conflict
// Notes explains automatic resolutions, for the caller to log.
Notes []string
}
Result is the outcome of a merge.