merge-base: separate "--independent" codepath into its own helper