build_helper::git

Function get_rust_lang_rust_remote

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

Finds the remote for rust-lang/rust. For example for these remotes it will return upstream.

origin  https://github.com/Nilstrieb/rust.git (fetch)
origin  https://github.com/Nilstrieb/rust.git (push)
upstream        https://github.com/rust-lang/rust (fetch)
upstream        https://github.com/rust-lang/rust (push)