From d9ddd6ed097adae6d3315976118725f880c1f737 Mon Sep 17 00:00:00 2001 From: Martin von Zweigbergk Date: Wed, 15 Sep 2021 09:29:16 -0700 Subject: [PATCH] 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. --- src/commands.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commands.rs b/src/commands.rs index 19b498a73..f946b51bf 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -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); } } }