-
-
Notifications
You must be signed in to change notification settings - Fork 13.6k
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
fetchgit ignore deepClone and does a shallow clone anyway #179788
Comments
Could you give a real-world scenario for deepClone? All the ones in Nixpkgs are broken, with or without the optimisation. AFAICT your reproducer merely checks whether a clone is sparse? |
My real-world scenario is for a short-lived, local only derivation where the broken aspect (non-determinism) of My issue is that the doc say:
but my reproducer shows that this is not the case: |
What I need is a concrete Nix example snippet that makes use of a property of deepClone and doesn't work without because I don't know what deepClone is useful for. Relying on a stable version is not a good idea as that will be deprecated in half a year or so and will likely break in the future. My change should also not have caused any regressions in the real world. Given that it's taken this long for someone to find out though, I also question why we even need deepClone. I also don't really understand why you'd need it in the first place. It'd be great if you, as a real-world consumer of that feature, could enlighten me of that |
Well the point of using #130040 force use of |
Bumping to see if anyone has workarounds for this. Some projects make use of the contents in the .git folder and without deep clones they cannot be built cleanly. An example of a repo that makes use of the .git folder is https://github.com/PX4/PX4-Autopilot |
@wcole3 Disabling the optimized shallow clone when |
@emily-is-my-username I created a PR from your patch! I hope you don't mind: #252865 |
Since #130040
deepClone = true;
(forfetchgit
andfetchFromGitHub
) andnix-prefetch-git --deepClone
don't work anymore.ie, when running
cat $(nix-prefetch-git --quiet --deepClone --leave-dotGit https://github.com/NixOS/rfcs 220af8e4f171425d168334f07163ea3db2eb8161 | jq -r .path)/.git/shallow
Actual result :
Expected:
Reverting #130040 fix the issue, but the optimization should be kept when
deepClone
is not used.The text was updated successfully, but these errors were encountered: