Fix GitHub code link generation when failing to resolve tracking branches.

Review Request #12739 — Created Nov. 27, 2022 and submitted

Information

beanbag-docutils
master

Reviewers

When failing to resolve tracking branches, we'd end up with a None
result, which would then get fed back into a git rev-parse, causing an
error.

This change avoids this situation, and ensures we don't try to generate
a link if we fail to locate a branch (since it won't have a stable SHA
to point to). It also and asserts that we don't pass in either a None
for the command or any falsey values in the list.

Unit tests pass.

Successfully built Review Board docs.

Summary ID
Fix GitHub code link generation when failing to resolve tracking branches.
When failing to resolve tracking branches, we'd end up with a `None` result, which would then get fed back into a `git rev-parse`, causing an error. This change avoids this situation, and ensures we don't try to generate a link if we fail to locate a branch (since it won't have a stable SHA to point to). It also and asserts that we don't pass in either a `None` for the command or any falsey values in the list.
c9186bb4977410bffe667fb9fc2a5ce7f1961542
david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to master (78d97db)