Skip to content

Add union merge driver for CHANGELOG.md to reduce merge conflicts - #172

Merged
Mike Krüger (mkrueger) merged 1 commit into
mainfrom
dev/mkrueger/changelog-union-merge
Jul 13, 2026
Merged

Mike Krüger (mkrueger) merged 1 commit into
mainfrom
dev/mkrueger/changelog-union-merge

Conversation

@mkrueger

Copy link
Copy Markdown
Collaborator

What

Adds a union merge driver for CHANGELOG.md via .gitattributes.

CHANGELOG.md merge=union

Why

Every PR appends a bullet to the same ## Unreleased section at the top of CHANGELOG.md, so concurrent PRs touch adjacent lines and Git cannot auto-merge them. This makes CHANGELOG.md conflict on almost every branch that falls slightly behind main.

The built-in union merge driver resolves this common case automatically: on a merge, it keeps the lines from both sides instead of raising a conflict — exactly what we want when two PRs each add their own Unreleased entry. It requires no local configuration (it ships in .gitattributes) and is honored by GitHub's own merge.

Caveats

union does not de-duplicate or reorder. It keeps entries from both branches as-is, so:

  • A stale branch that re-lists already-released entries will merge silently rather than conflicting — review the merged ## Unreleased section before releasing.
  • Ordering follows both sides' insertion order; tidy up manually if needed at release time.

For the day-to-day "each PR adds one Unreleased bullet" case this removes the conflict entirely. A more structural fix (one changelog fragment file per PR, aggregated at release time) can follow separately if desired.

Scope

  • .gitattributes only. No source or behavior changes.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the repository’s Git attributes to reduce frequent merge conflicts in CHANGELOG.md by applying Git’s built-in union merge driver to that file, which is a good fit for append-heavy “Unreleased” entries.

Changes:

  • Add a .gitattributes rule CHANGELOG.md merge=union so merges keep entries from both sides instead of producing conflicts.
  • Document the behavior and caveats of union directly in .gitattributes for future maintainers.
@github-code-quality

Copy link
Copy Markdown

Code Coverage Overview

Languages: C#

C# / code-coverage/dotnet

The overall coverage remains at 61%, unchanged from the main branch.


Code Coverage is in Public Preview. Learn more and provide us with your feedback.

@mkrueger
Mike Krüger (mkrueger) merged commit 2647bcb into main Jul 13, 2026
11 checks passed
@mkrueger
Mike Krüger (mkrueger) deleted the dev/mkrueger/changelog-union-merge branch July 13, 2026 09:02
Mike Krüger (mkrueger) added a commit that referenced this pull request Jul 20, 2026
## What

Stamps the changelog release heading as `## 1.1.136-preview —
2026-07-20` and fills in the entries for PRs merged since
1.1.115-preview.

Supersedes #185 (same content, version heading bumped from `1.1.135` to
`1.1.136` to account for the extra git-height commit).

## Added entries

- **New features** — `ttl` and `conflict` commands for container
time-to-live and conflict-resolution policy
([#151](#151),
[#111](#111)).
- **Fixes** — MCP protocol-version rejection (e.g. Claude Code) and the
`ObjectDisposedException: The CancellationTokenSource has been disposed`
error on tool calls
([#150](#150)).
- **Build & pipeline** — CodeQL analysis workflow
([#165](#165)), Node 24
GitHub Actions updates
([#152](#152)), and a `union`
merge driver for `CHANGELOG.md`
([#172](#172)).

## Scope

- `CHANGELOG.md` only. No source or behavior changes. `version.json` is
unchanged — the patch is derived from git height by
Nerdbank.GitVersioning.
Mike Krüger (mkrueger) added a commit that referenced this pull request Jul 31, 2026
The repo uses a union merge driver on the Unreleased list (.gitattributes, #172); retaining an empty ## Unreleased heading avoids the next changelog PR reintroducing it and reduces merge churn.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants