Skip to content

source-repository-package generates fat clones #7264

@andreasabel

Description

@andreasabel

Fetching a source-repository-package seems to make a full clone of the repo:

$ cabal --version
cabal-install version 3.5.0.0
compiled using version 3.5.0.0 of the Cabal library 

$ cat cabal.project 
optional-packages: Agda

source-repository-package
  type: git
  location: https://github.com/agda/agda.git
  tag: e12f391d2539b62a62d18aef74149a9a4695a871

package Agda
  ghc-options: -fno-expose-all-unfoldings -fno-specialise-aggressively

$ cabal build all
... cloning ...

$ du -d3 -h
...
221M	./dist-newstyle/src/agda-eef06c3b3e56f437
...

Isn't there a more economic (and at the same time faster) way to clone a git repo if one only wants the version at a specific commit?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions