Skip to main content

remote_head

Function remote_head 

Source
pub async fn remote_head(
    url: &str,
    credentials: Option<&Credentials>,
    follow_redirects: bool,
) -> Result<RemoteHead>
Expand description

The branch the HEAD of the remote at url names, asked with the same credentials and redirect policy a clone of url takes.

branch is the bare name, without refs/heads/. Neither field is set when the remote names no branch: an empty repository, a detached HEAD, or a server that does not advertise symbolic refs. error is what git said, with the credential hidden, when the remote could not be asked or did not answer in time. An Err means git could not be run at all, the credential could not be prepared, or a url with no credential is not http.