From eb5a89a9d9959a3fa321545c1d31267937b6a4a6 Mon Sep 17 00:00:00 2001 From: Leo Zhang Date: Sat, 27 Jun 2020 01:00:13 -0700 Subject: [PATCH] fix: Don't use --detached, fixes #6888 --- cabal-install/src/Distribution/Client/VCS.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cabal-install/src/Distribution/Client/VCS.hs b/cabal-install/src/Distribution/Client/VCS.hs index 49addef110c..2f30c5e502a 100644 --- a/cabal-install/src/Distribution/Client/VCS.hs +++ b/cabal-install/src/Distribution/Client/VCS.hs @@ -384,7 +384,7 @@ vcsGit = Just peerLocalDir -> ["--reference", peerLocalDir] ++ verboseArg where loc = srpLocation - checkoutArgs = "checkout" : verboseArg ++ ["--detach", "--force" + checkoutArgs = "checkout" : verboseArg ++ ["--force" , checkoutTarget, "--" ] checkoutTarget = fromMaybe "HEAD" (srpBranch `mplus` srpTag) verboseArg = [ "--quiet" | verbosity < Verbosity.normal ]