git merge-base is what you want, I think, more specifically --upstream-branch should default to $(git merge-base HEAD upstream)
git merge-base is what you want, I think, more specifically --upstream-branch should default to $(git merge-base HEAD upstream)