Merged pull requests keep their commits and files; compare takes main~1 #326
Intentwhat this change is meant to do
Fix two bugs reported on GitHub #4: merged (and imported merged) pull requests showing 0 commits and 0 files, and /compare/main~1...main returning 404.
test-bot merged commit f5f3f60 into main
Pull request successfully merged and closed
test-bot merged f5f3f60 into main
Sign in to join the conversation.
Requested by Can · project thread
#What this changes
Two of the smaller bugs reported on GitHub (codician-team/diffinery#4):
pulls.merged_basecolumn set bycompleteMerge, which covers direct merges, auto-merge and the merge queue.base.sha./compare/main~1...mainreturned 404.resolve()now takes git's ancestry suffixes (~N,^N,~,^) after any branch, tag, SHA orHEAD. Ref names can't contain~or^, so nothing that resolved before changes. Compare, commits, contents and everything else that resolves refs get this.#How it was tested
--no-ffmerged PR #2 has 1 commit and 1 file, with the right SHA and filename. This fails on main.merge_method: "merge"now checks the PR still lists its two commits and both files.main~1...main,main^...main,main~...HEAD,<sha>...main~0andcommits/main~1, plus 404s formain~2past the root andmain^2with no second parent.#Checklist
🤖 Generated with Claude Code
https://claude.ai/code/session_015ALxdbMU5hpZXjGpL2jhC4