[arch-general] Why no git --depth=1 option for makepkg?
admin at progandy.de
Sun Mar 4 15:37:18 UTC 2018
Am 04.03.2018 um 01:08 schrieb Eli Schwartz via arch-general:
> Yep -- more or less this. There is no way for git to fetch "all commits
> since a given tag", and obviously `git describe` which is used in the
> standard pkgver() function cannot describe the remote repository... not
> to mention what happens when the repository has *no* tags, and git
> rev-list --count HEAD depends on all commits since the repository was
> Then there is the fact that --depth, or even --single-branch (not that
> this usually saves much space or time), will break on PKGBUILDs that use
> `git cherry-pick` to backport fixes (more commonly seen in non-VCS
> packages obviously).
> All in all, there is simply no way to generically support shallow clones
> in a generic way. The best you can do is take a given PKGBUILD, predict
> what it needs, and perform the clone manually according to handpicked
> criteria as makepkg will detect that clone and then simply fetch new
> changes which respects a previous shallow clone designation.
Maybe a working option would be to implement fragmant variables for some
git options like depth, shallow-exclude and shallow-since, but that is
likely not trivial.
More information about the arch-general