git merge-tree --write-tree a b does the merge in memory and tells you if it's clean without touching your working tree. Handy before merging two agent branches, but clean only means the text merges, it doesn't tell you if the two plans fit together.
commit 6d74cf2