pub fn clone(
path: PathBuf,
url: &str,
options: CloneOptions,
) -> Result<Repository>Expand description
Clone a remote repository into the worktrees layout.
The repository is cloned as a bare repo at <path>/.bare and a .git link
file is written at <path>/.git so that standard git tooling continues to
work. The fetch refspec for origin is configured to fetch all branches.
If path already ends with .bare it is used as-is; otherwise .bare is
appended.