Re: Why no git --depth=1 option for makepkg?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



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
initialized.

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.

source=("one::git+https://repo.git#branch=master:shallow-exclude=v4.14";
"two::git+https://repo.git#branch=master:shallow-since=2017-12-30";)

--
Andy



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux