Both tools merge with git merge-tree --write-tree, which needs git 2.38,
and pr_overlap's pairwise merges also pass --merge-base, which needs
git 2.40. On an older git, such as 2.34 on Ubuntu 22.04, they stopped
with git's merge-tree usage text and nothing said what was wrong. A
failing merge now reports the version it needs and the one found when
git is older; on a recent enough git the error is unchanged.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
report() turned every nonzero exit of git merge-base into "<head> and
<base> have no common ancestor", so a mistyped or unfetched --head, a
tree or a blob was reported as unrelated history and git's own error was
dropped. Now only exit status 1 keeps that message, and any other
failure raises "git merge-base failed: <stderr>" like the merge-tree
call in conflicts(). git merge-base returns 1 when the histories share
no commit and dies with 128 when a revision does not resolve to a
commit. The tool still exits 2 in both cases, and
test_unrelated_histories_are_an_error now also checks that an invalid
head reports git's own merge-base error and not a missing common
ancestor.
main() resolved the base before running --fetch, so an explicit base on a
remote that was never fetched failed with "no base ref found" and never
fetched. The fetch is now a local helper and runs first when --base is
given; the default base still resolves first, then fetches.
Co-Authored-By: Claude Opus 5.5 <[email protected]>