resolveGitMergeBaseCommit
Resolves the merge-base of HEAD with the remote default branch by running git merge-base HEAD origin/master (then origin/main as fallback) in the given repoRoot. Returns the merge-base SHA, or null when git is not available or the merge-base cannot be determined.
This is the fallback used when the faster file-based readRemoteDefaultBranchCommit cannot resolve the ref (e.g. when the remote tracking branch only exists in pack objects that require DAG walking). In a Gradle configuration-cache context, prefer readRemoteDefaultBranchCommit since it avoids external process invocation.