Parallel work
Integration and conflicts
Git's merge machinery addresses textual merging and makes no claim about the other problem, whether the result is behaviourally correct. The default strategy for two heads is ort, a 3-way merge that builds a merged tree of multiple common ancestors where they exist and that detects renames.1 A conflicted path is recorded in the index in three stages, the common ancestor, HEAD and MERGE_HEAD, and the working tree gets the marker lines.1 The merge.conflictStyle setting can add a base section with diff3, or trim lines matching on both sides from the edges of the region with zdiff3.1 All of that describes the resolution of textual conflicts. The documentation makes no claim about whether a clean merge is behaviourally correct.1
One case parallel integration has to account for is the one git does not name: two branches that merge with no marker anywhere and are still behaviourally incompatible. This volume calls that a semantic conflict. No primary source was found defining the term, so treat it as this volume's framing rather than a git concept, and treat a clean merge as the point where verification starts rather than the point where it ends.
Mechanically, parallel work integrates more calmly than it sounds. By default, git worktree add refuses to check out a branch already checked out elsewhere, unless forced, and that is what normally keeps parallel agents on distinct branches.2 Because all worktrees share one object database and one set of refs, a commit made in one worktree is visible to every other immediately, with no push or fetch.3 Claude Code will not let a worktree session write into the main checkout at all, so integration has to happen as an explicit git operation.4 At the far end, a GitHub merge queue builds temporary branches combining the base branch with the pull requests ahead in the queue, merges in first-in-first-out order with required checks satisfied, and removes a pull request whose checks fail before rebuilding without it.5 Keep uncommitted work out of the way while integrating: git stops when local changes overlap files the merge would update, and the documentation warns that git merge --abort can fail to reconstruct uncommitted changes that existed when the merge began.1
When this does not hold. None of this says how bad it gets at scale. No measurement was found of conflict rate or conflict severity as a function of the number of parallel agents or branches, from any vendor or study, and none of whether an agent resolves a conflict more or less reliably than a person does. Ordering is documented only as merge-queue first-in-first-out batching. A heuristic such as smallest diff first has no source behind it.
Quellen
Quizze
Git's merge documentation describes the resolution of ____ conflicts and makes no claim about whether a clean merge is behaviourally correct.
- textual
- semantic
- structural
Git records a conflicted path in three index stages and writes marker lines for the reader to resolve. Its documentation never claims a clean merge is behaviourally correct.
What does a clean merge, with no conflict markers anywhere, mean for verifying the combined branches?
- Verification is only beginning
- Verification is complete
- Verification is unnecessary because git's merge already checked behaviour
Git's merge machinery resolves textual conflicts only and makes no claim about behavioural correctness, so a clean merge is where checking the combination still works should start, not end.
Kommentare
Noch keine Kommentare. Fang das Gespräch an.