With:
source-repository-package
type: git
location: git://github.com/georgefst/pretty-simple.git
branch: experimental
at the top of my cabal.project, I get the failure fatal: '--detach' cannot be used with '-b/-B/--orphan'. Unclear what's causing this. It works fine with master.
git version is 2.7.4, which is pretty old (can't upgrade right now on my work machine), so if that's the issue, I'll just work around it.
An example output
Project settings changed, reconfiguring...
creating /code/public-haskell/tree-diff/dist-newstyle
creating /code/public-haskell/tree-diff/dist-newstyle/cache
/usr/bin/git --version
creating /code/public-haskell/tree-diff/dist-newstyle/src
/usr/bin/git clone --no-checkout 'git://github.com/georgefst/pretty-simple.git' /code/public-haskell/tree-diff/dist-newstyle/src/pretty-si_-3997a25a56f97597
Cloning into '/code/public-haskell/tree-diff/dist-newstyle/src/pretty-si_-3997a25a56f97597'...
remote: Enumerating objects: 55, done.
remote: Counting objects: 100% (55/55), done.
remote: Compressing objects: 100% (39/39), done.
remote: Total 1204 (delta 16), reused 44 (delta 11), pack-reused 1149
Receiving objects: 100% (1204/1204), 288.14 KiB | 1.56 MiB/s, done.
Resolving deltas: 100% (514/514), done.
/usr/bin/git checkout --detach --force experimental --
fatal: '--detach' cannot be used with '-b/-B/--orphan'
and looks like we have an unsolved TODO
For anyone else who arrives at this, you can work around it by cding into the cloned directory in dist-newstyle and manually running the correct git checkout yourself.
Most helpful comment
An example output
and looks like we have an unsolved TODO
https://github.com/haskell/cabal/blob/5ce6b08b332fecf4e5100595bbe55edf6060f99c/cabal-install/Distribution/Client/VCS.hs#L628-L629