fetchTree/fetchGit: fix ref not respected when rev is set#9668
fetchTree/fetchGit: fix ref not respected when rev is set#9668DavHau wants to merge 1 commit intoNixOS:masterfrom
Conversation
|
Isn't disabling shallow fetching a pretty massive performance regression? |
|
It performs badly, but not worse compared to the latest stable version. Stable nix never did shallow fetching in any scenario, even when shallow was set 'true'. Setting shallow=true simply allowed the remote to be shallow, but cloned it as is. If you look at the code prior to libgit2, you will find that --depth was never set. If we care strongly about backward compatibility, the most plausible way forward seems to be introducing a new code path for shallow cloning, that's activated by a new flag, as discussed in #9402. I already started with an implementation of this which I will try to finish by next week. |
|
The reason why we simply cannot do a
-> As long as we have to respect |
|
Nix team discussion notes:
|
|
It seems that this affects the (internal) fetching of submodules as well. Lines 620 to 622 in 9651034 |
That's unless the disallowing guarantees an important property, and in this case, I don't think it's desirable. |
|
I'm not sure if this is considered (the meeting summary doesn't mention it, and @roberth's #9668 (comment) only tangentially mentions it), but I feel like there's some lack of nuance regarding the utility of
This is quickly typed out on handheld smartphone device. Will come w/a do-over edit later for any corrections/clarifications. |
OK, I wasn't quite aware of that, but it seems to make sense I agree with @roberth, checking for Closing this and the corresponding issue. |
reverts #9410 (except using depth=1 when shallow=1 as that won't make sense anymore)
fixes #9667