cli: fix an obsolete variable name

I forgot to remove the `fetch_head` from a variable name when I
recently realized that Git's `FETCH_HEAD` is not what we want to check
out after fetching.
This commit is contained in:
Martin von Zweigbergk 2021-09-15 09:29:16 -07:00
parent 48f237e33e
commit d9ddd6ed09

View file

@ -3286,8 +3286,8 @@ fn cmd_git_clone(
.view()
.get_remote_branch(&default_branch, "origin");
if let Some(RefTarget::Normal(commit_id)) = default_branch_target {
if let Ok(fetch_head_commit) = repo.store().get_commit(&commit_id) {
tx.mut_repo().check_out(ui.settings(), &fetch_head_commit);
if let Ok(commit) = repo.store().get_commit(&commit_id) {
tx.mut_repo().check_out(ui.settings(), &commit);
}
}
}