-
-
Notifications
You must be signed in to change notification settings - Fork 344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: shallow clone for git repos #972
Comments
Prove it. |
It is faster to get only the last commit of a branch than to get the full history of a repo. Enough for you? |
Those are upstream git repos and is makepkg's job to handle. Yay only downloads the AUR repos which are small enough that a shallow clone would have no impact. And as far as makepkg goes, they refuse to support this: https://bugs.archlinux.org/task/52957? |
I think it's just a confusion of what yay actually git clones when you pull a
Although this data has no statistical relevance since it's not done in a controlled and measured environment, it relies only on one sample and it won't be possible to replicate specifically it should at least hint that there is no advantage to shallow cloning PKGBUILD repos (specially when they are so useful for diffing). In relation to makepkg clones: not our job, @Morganamilo s link also shows they are aware. Maybe in alternative you can shallow git clone the repo and then run makepkg, I do think it should pick up the source. Closing. |
It makes sense. For some unknown reason, I thought it was yay's job to
parse the PKGBUILD... Thanks for clearing things up.
…On Sun, 23 Jun 2019, 07:41 J Guerreiro, ***@***.***> wrote:
I think it's just a confusion of what yay actually git clones when you
pull a PKGBUILD.
When yay says it's cloning a repo (and let's use kicad-git as the example
you chose) it's cloning https://aur.archlinux.org/kicad-git.git that only
has a the very small PKGBUILD file and not the place where the code
actually lives https://git.launchpad.net/kicad.
% time git clone https://aur.archlinux.org/kicad-git.git /tmp
Cloning into 'kicad-git'...
remote: Enumerating objects: 122, done.
remote: Counting objects: 100% (122/122), done.
remote: Compressing objects: 100% (110/110), done.
remote: Total 122 (delta 12), reused 122 (delta 12)
Receiving objects: 100% (122/122), 36.69 KiB | 1.08 MiB/s, done.
Resolving deltas: 100% (12/12), done.
git clone https://aur.archlinux.org/kicad-git.git 0.05s user 0.03s system 11% cpu 0.628 total
% time git clone --depth 1 --recursive --shallow-submodules https://aur.archlinux.org/kicad-git.git
Cloning into 'kicad-git'...
remote: Enumerating objects: 5, done.
remote: Counting objects: 100% (5/5), done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 5 (delta 0), reused 5 (delta 0)
Unpacking objects: 100% (5/5), done.
git clone --depth 1 --recursive --shallow-submodules 0.06s user 0.04s system 13% cpu 0.764 total
Although this data has no statistical relevance since it's not done in a
controlled and measured environment, it relies only on one sample and it
won't be possible to replicate specifically it should at least hint that
there is no advantage to shallow cloning PKGBUILD repos (specially when
they are so useful for diffing).
In relation to makepkg clones: not our job, @Morganamilo
<https://github.com/Morganamilo> s link also shows they are aware. Maybe
in alternative you can shallow git clone the repo and then run makepkg, I
do think it should pick up the source.
Closing.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#972?email_source=notifications&email_token=ADGWRRVDYHDH2RVJQTP7HVDP35HMJA5CNFSM4H2XNPY2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYK3PRQ#issuecomment-504739782>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADGWRRXQNUX3DG77TQAJARTP35HMJANCNFSM4H2XNPYQ>
.
|
@Jguer , @Morganamilo you are right when you say it makes sense. but - otoh - makepkg is very modular and crealting a file "makepkg-shallow" with the following contents and call it instead of makepkg would do the trick.
i know it woudl be not beautiful to add a script like this to the yay codebase. but it is so small that one might try it, switchable, in yay, and if it works suggst to add it upstream. sources:
|
just those this is a makepkg/PKGBUILD specific issue, not a package fetching and dependency resolving issue. I would prefer the switch to be added on |
Sorry for my misunderstanding |
Wrong Look the improvements it makes ImperatorStorm/PKGBUILDs#4 |
@ryuukk Again, this is the same misunderstanding explained in the comment that you quote. Your example is cloning the upstream source repo, not cloning the AUR repo containing mainly the PKGBUILD. These are two different git operations.
|
For others interested in this, |
pacman-git and |
implemented by #2348 |
The Arch Wiki now gives an example of how to use |
Now the question is how to make yay work with this env var |
It would save some time to do a shallow clone of a git repo, instead of getting the full history:
git clone --depth 1 --recursive --shallow-submodules <repo>
The text was updated successfully, but these errors were encountered: