Skip to content

Commit

Permalink
Change git invocations to improve error reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
typedrat committed Jul 19, 2018
1 parent f248de6 commit d484bc4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cabal-install/Distribution/Client/VCS.hs
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ vcsGit =
branchArgs = case repoBranch repo of
Just b -> ["--branch", b]
Nothing -> []
checkoutArgs tag = ["checkout", tag] ++ verboseArg
checkoutArgs tag = "checkout" : verboseArg ++ [tag, "--"]
verboseArg = [ "--quiet" | verbosity < Verbosity.normal ]

vcsSyncRepos :: Verbosity
Expand Down Expand Up @@ -405,8 +405,8 @@ vcsGit =
Just peerLocalDir -> ["--reference", peerLocalDir]
++ verboseArg
where Just loc = repoLocation
checkoutArgs = [ "checkout", "--detach", "--force"
, checkoutTarget ] ++ verboseArg
checkoutArgs = "checkout" : verboseArg ++ ["--detach", "--force"
, checkoutTarget, "--" ]
checkoutTarget = fromMaybe "HEAD" (repoBranch `mplus` repoTag)
verboseArg = [ "--quiet" | verbosity < Verbosity.normal ]

Expand Down

0 comments on commit d484bc4

Please sign in to comment.