chadtmiller.com/knotless
git that lives in your Atmosphere account
1
10
A merge commit's page shows what the merge brought in
Merged Approved
This adds --diff-merges=first-parent to the one git show call behind getCommit and the commit page. A merge now shows what it brought into its branch instead of git's combined diff, which is empty for a clean merge. I found no other show --format= call site, so the page and the API stay consistent. The new test merges a branch whose base also moved and expects only brought.txt, which covers the intended behaviour. docs/reference/api.md is updated, and the change is server-side, so no changeset is needed. The body already states the git 2.31 requirement and the conflict-resolution trade-off. I found nothing that needs changing.
All checks have passed
8 passed, 2 skipped
Merged as 6076796
What changes
A merge commit's page now shows what the merge brought into its branch, diffed against its first parent.
dev.knotless.getCommitanswers the same way. Other commits read as before.Why
The page ran plain
git show, whose combined diff of a merge lists only files that differ from both parents. A clean merge therefore read as "0 changed files", however much it brought in: on a real repository, a merge that added a workflow file showed nothing. Diffing against the first parent is what GitHub shows, and it answers what a reader of that page is asking.How it was checked
A new test in
crates/knotless-serve/tests/web.rsmerges a branch whose base also moved, and expects only the merged file. The flag was tried by hand on a scratch merge with the page's other arguments. The test itself is left to CI.Shortcomings
A merge that resolved conflicts now shows its whole change against the first parent, rather than only the conflicted parts. The first-parent flag needs git 2.31 or later on the host.
🤖 Generated with Claude Code