cli: don't snapshot when cloning Git repo

There's nothing to snapshot when we have just created an empty repo to
clone into. There are also no Git refs to import.
This commit is contained in:
Martin von Zweigbergk 2022-10-08 00:14:09 -07:00 committed by Martin von Zweigbergk
parent b4dc105dd7
commit 999e31089b

View file

@ -4106,7 +4106,6 @@ fn do_git_clone(
let git_repo = get_git_repo(repo.store())?;
writeln!(ui, r#"Fetching into new repo in "{}""#, wc_path.display())?;
let mut workspace_command = command.for_loaded_repo(ui, workspace, repo)?;
workspace_command.snapshot(ui)?;
let remote_name = "origin";
git_repo.remote(remote_name, source).unwrap();
let mut fetch_tx = workspace_command.start_transaction("fetch from git remote into empty repo");