the fully qualified ref name on GitHub is refs/heads/BRANCH
the fully qualified ref name in the local repository is refs/remotes/REMOTE/BRANCH (with REMOTE being the name of the GitHub remote, typically origin)
The code base is a bit cluttered with code contructing these strings.
This commit introduces a new struct, GitHubBranch, which constructs the names of refs for GitHub-side branches.
Test Plan: build locally, use to submit and land this diff. Also cargo test
For a GitHub-side branch with name BRANCH:
refs/heads/BRANCH
refs/remotes/REMOTE/BRANCH
(withREMOTE
being the name of the GitHub remote, typicallyorigin
) The code base is a bit cluttered with code contructing these strings.This commit introduces a new struct,
GitHubBranch
, which constructs the names of refs for GitHub-side branches.Test Plan: build locally, use to submit and land this diff. Also
cargo test