Don't update HEAD ref in fake repo when creating detached worktree

Anthony Eid created

This goes against what git does internally and could cause testing bugs
in the future

Change summary

crates/fs/src/fake_git_repo.rs | 2 --
1 file changed, 2 deletions(-)

Detailed changes

crates/fs/src/fake_git_repo.rs 🔗

@@ -610,8 +610,6 @@ impl GitRepository for FakeGitRepository {
                     let ref_name = format!("refs/heads/{branch_name}");
                     state.refs.insert(ref_name, sha);
                     state.branches.insert(branch_name);
-                } else {
-                    state.refs.insert("HEAD".into(), sha);
                 }
                 Ok::<(), anyhow::Error>(())
             })??;