Skip to main content

clone_granted

Function clone_granted 

Source
pub(crate) fn clone_granted(
    api: &str,
    grants: &[&str],
    style: Style,
) -> Vec<String>
Expand description

Clones each repository grants names into the current directory, one report row per repository, and returns the folders that hold a copy.

Runs after the token and the credential helper are written, so the clone authenticates the way every later git pull and git push in that folder will: through the helper, from a URL that carries no credential. A folder already there that pulls from the same URL is the copy, which is the ordinary case on a second run; any other folder by that name is somebody’s work and is left as it was. A clone that fails is reported with the line that finishes it rather than failing the join, because the account already exists, and the same link run again tries only what is still missing.