[OS-BUILD PATCH] Use upstream/master for merge-base with fallback to master