Repository navigation
Conversation
Every PR inserts its line directly under the same [Unreleased] heading, so any two PRs conflict on CHANGELOG.md even though both lines belong. The union merge driver keeps both sides on a local merge or rebase. GitHub's conflict check ignores merge drivers, so a PR can still show as conflicting until `git merge origin/develop` is run and pushed; the contributor guidance now says so and asks for a duplicate-line check, which union does not do. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QAUAys8r9ZkczYYGnnJ5ae
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
Contributor
|
Replaced by #1037 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two PRs opened the same week both hit a
CHANGELOG.mdconflict againstdevelop(#977 and #1004), and both resolutions were the same: keep both sides. This PR makes git do that on its own.What changes
.gitattributesgainsCHANGELOG.md merge=union. On a local merge or rebase, git keeps both sides of a conflicting hunk in the changelog instead of stopping.CLAUDE.mdexplains the driver, its GitHub limitation, and the one thing to check after such a merge.Why the changelog conflicts so often
Every PR inserts its entry at the same spot: the first line under a heading in
[Unreleased]. Git merges by matching surrounding context, so two PRs that both added a line directly below### Fixedare two different edits at one location, and git cannot pick an order. Code rarely hits this because PRs touch different functions. The changelog is the one file where every PR edits the same three-line neighborhood.Reviewer Notes
The driver only runs in a local git. GitHub's mergeability check does not honor custom merge drivers, so a PR whose only conflict is the changelog will still show as conflicting on GitHub. The fix is unchanged from today,
git merge origin/developthen push, but the merge now completes without a manual edit. The CLAUDE.md note says exactly that so nobody expects the red badge to disappear.The trade-off worth knowing:
unionnever reports a conflict for this file. If two PRs both edit the same existing line, union keeps both versions silently instead of flagging it. For an append-only file that is the right trade, but it is why the guidance asks for a glance at[Unreleased]after a merge. The one duplicate we saw during #977 came from both branches already carrying the same entry once; union would have kept that duplicate too, which is the case the note covers.I checked that the root
AGENTS.mdcarries no changelog rule of its own, so there is nothing to mirror there.Reproduction
Simulate two PRs inserting under the same heading, with this branch's
.gitattributesin place:Without the
.gitattributesline the merge stops with a conflict. With it, the merge exits 0 and the file lists both new entries above the old one.Local checks run: typos on the two changed files. No code or tests are affected.
🤖 Generated with Claude Code
https://claude.ai/code/session_01QAUAys8r9ZkczYYGnnJ5ae