Closes#97595
The prior approach of manually diffing the entire log chain is less
efficient, and only found the original branch point ignoring subsequent
merges. The limitation forced PR workflows into rebasing and force
pushing new history to get the branch point far enough for CI to pass.
Use `git merge-base` to find the latest common commit with the main
branch.
Add an `allowFailure` argument to the `git` utility to use a more
specific failure in the case of no shared history when this command will
fail with a generic error.
Use `^branch` with the `git log` commands to exclude shared history and
more easily count the unique commits on each branch.
Drop the `Commit` abstraction. Parse directly to timestamp or line counts.