At least for GitHub remotes, don't they still support checking out with SVN? If they do, this would be faster and use less space, too, when we just need a certain revision and no history at all. Other than that, I'm "pretty sure" that a git depth of 10 commits will work for most repositories when you clone normally, not shallow. Should also work for tags. However, it's true that git's limited depth clone isn't implemented fully. There are many unhandled cases and surprises. All that being said, I can report that in CI of personal and company projects, I haven't yet run into problems with depth=5. It speeds up checking out the tree, even when it's a fast local network remote. On 3/4/18, Eli Schwartz via arch-general <arch-general@archlinux.org> wrote:
On 03/04/2018 10:37 AM, ProgAndy wrote:
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")
That would require opt-in support for every package to describe which commits it needs, something which the vast majority of maintainers are uninterested in and requires successively more query strings for each branch you want to cherry-pick from.
Also shallow-exclude would exclude the tag itself, you cannot specify "v${pkgver}~1" to shallow-exclude.
As you say, not trivial. ;) I've thought about it too...
-- Eli Schwartz Bug Wrangler and Trusted User