SERVER-139124Backlog

Optimize bazel_rules_mongo's get_diff_revision

1. Check the cheap case first - for example, we would never have to initialize a Repo() if we fall into this else branch 2. Regarding the if expansions.get("github_pr_number", None): branch above, we could write it like this to avoid enumerating branches   We use get_diff_revision in a few places to to revolve a diff of what the current "changes under test" are.

Affected Versions
Versions known to exhibit this issue

No affected versions recorded.

Fixed Versions
Versions that include the fix

No fix available yet.

Components
Server components related to this issue

No components specified.

Labels
Tags and classification

No labels assigned.