-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Nix doesn't fetch repositories shallowly when told to #5119
Comments
Interesting, when did it break? Or was the bug around since the |
I think the use case is not reproducible and might be a misconception. Maybe |
I have been able to check it and it's definitely happening. Big problem here 😢 It seems this test just checks that nix derivation doesn't contain commit count, not that it's being really shallow: Line 204 in d354fc3
|
Well, maybe this parameter can only determine whether shallow clone is "allowed". nix/src/libexpr/primops/fetchTree.cc Lines 411 to 413 in e92cac7
According to the code, it just checks the local git repository if is "shallow repository" or not. Lines 586 to 590 in e92cac7
And this parameter is never used when calling "git fetch". So it have no impact on how git fetches remote content. Line 568 in e92cac7
|
nix run also ignores the shallow argument. When I tried |
Describe the bug
nix build 'git+https://github.com/NixOS/nixpkgs?shallow=1#hello'
doesn't fetch Nixpkgs shallowly.Steps To Reproduce
Since Nix runs
git
internally, it should take around the same time, disregarding the time it takes to fetchhello
from Hydra.The text was updated successfully, but these errors were encountered: