build_helper::git

Function updated_master_branch

Source
pub fn updated_master_branch(
    config: &GitConfig<'_>,
    git_dir: Option<&Path>,
) -> Result<String, String>
Expand description

Returns the master branch from which we can take diffs to see changes. This will usually be rust-lang/rust master, but sometimes this might not exist. This could be because the user is updating their forked master branch using the GitHub UI and therefore doesn’t need an upstream master branch checked out. We will then fall back to origin/master in the hope that at least this exists.