Skip to main content

fetch_bare

Function fetch_bare 

Source
pub fn fetch_bare(
    git_dir: &Path,
    url: &str,
    refspecs: &[&str],
    depth: Option<u32>,
    creds: &Credentials,
) -> Result<(), GitError>
Expand description

Ensure git_dir is an initialized bare repo, then fetch refspecs from url into it. Covers both the initial clone (a fresh bare repo) and a refresh of an existing one — grit-lib’s fetch copies only objects not already present, so a no-op refresh writes nothing.