source-repository: Use git shallow clones
commitb6c28eef30b12eb5bc9a3fb49fe7b06fc0b1774b
authorRodrigo Mesquita <rodrigo.m.mesquita@gmail.com>
Tue, 6 Aug 2024 13:39:38 +0000 (6 14:39 +0100)
committerRodrigo Mesquita <rodrigo.m.mesquita@gmail.com>
Sat, 16 Nov 2024 21:18:40 +0000 (16 21:18 +0000)
tree3d8fc9dd6ac3f3ea9ae47ab7e875ac3248b175ed
parent7ab3a5ee02c5f5c4425fd845fc4fca65842aae7c
source-repository: Use git shallow clones

Cloning the entire repository for the purpose of compiling packages
specified in source-repository-packages is wasted effort. To read and
compile the package, we need only the HEAD of the repository, thus a
shallow clone is sufficient.

Note that this doesn't change the behaviour of `cabal get -s` which
still does a full clone (--depth=1 is only used in vcsSyncRepo, not in
vcsCloneRepo)

Fixes #7264
cabal-install/src/Distribution/Client/VCS.hs
cabal-testsuite/PackageTests/ExtraProgPath/setup.out