Arch Linux

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#26723 - [abs] use "git clone --depth 1" in PKGBUILD-git.proto, eventually update your PKGBUILDs in AUR

Attached to Project: Arch Linux
Opened by Tomas Mudrunka (harvie) - Thursday, 03 November 2011, 00:27 GMT
Last edited by Allan McRae (Allan) - Thursday, 03 November 2011, 01:39 GMT
Task Type Feature Request
Category Documentation
Status Closed
Assigned To No-one
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No


In this prototype:

I think that line:
git clone "$_gitroot" "$_gitname"
should be replaced with:
git clone --depth 1 "$_gitroot" "$_gitname"

This will make git to not download whole repository (which may be soo f*cking vast), but downloads last two versions only (--depth 0 does not work for some reason) which can save hundreds of megabytes downloaded (and corresponding time of waiting)

which will also force you to change line:
git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
cp -rf "$srcdir/$_gitname" "$srcdir/$_gitname-build"

Git can't clone "shallow" repository which does not contain whole history, so we have to copy it. This will take some more time than cloning, but it's still way faster than cloning whole repository from internet. There is also workaround trick to clone shallow repository (rename .git/shallow to something else, clone, rename it back, copy .git/shallow to cloned repository), but i don't think that we need it right now...


Other thoughts:
- What about your *-git packages in AUR? Update them too plz.
- What about other versioning systems? I use only git, but there may be similar options for others... (especially in Mercurial which is very similar to git)
This task depends upon

Closed by  Allan McRae (Allan)
Thursday, 03 November 2011, 01:39 GMT
Reason for closing:  Duplicate
Additional comments about closing:   FS#23065