pub fn fetch(spec: &Spec, dir: impl AsRef<Path>) -> Result<ObjectId>Expand description
Fetches the contents of a git repository into directory.
The directory will be created if it doesn’t exist yet. The data will be fetched from scratch, even if it has already been fetched before. However, we will try to minimize the amount of data to fetch (for example, by doing a shallow fetch).
Only the contents of the git repository will be written to the given directory; the git directory itself will be discarded.