-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Cannot clone Linux kernel on Windows #2046
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
Comments
I am not looking for workarounds, what I am trying to say is that this issue might get fixed if the fileopen api is the same as the one used by gnu touch or ls implementation. Can someone give more insight on what is the definition of the open method used here: Thank you, |
Therefore it is an intentional design of Git for Windows to not allow such file names. Granted, you might be able to browbeat Git to check out those files, but you will run into trouble later anyway. If you still insist that it should be a good idea to generate those illegal file names, I dare you to patch (and open a PR) |
@ader1990 If you can manage to create a method that will detect such files and hold them in abeyance as if they are in the index, but not in the worktree then that may be of benefit. There is a (potential) corresponding issue for partial clones where a promised file isn't being released to the user though the oid/sha1 is known. At the moment there is a bit of a blind spot for such cases. Maybe it's an alternat version of a smudge/clean filter that detects some special prefix that locall is used to cope with these forbidden file names (and maybe Linux D/F conflic names?) |
@ader1990 I have a pre-commit hook checking for legal filenames on windows -> https://github.com/t-b/git-pre-commit-hook-windows-filenames. In case that helps. |
There's some development on that front: https://github.com/davidwin/git/commit/f21c7af658a7bfeb11ecde569336c8ba6d9a9354 Feel free to work with David to drive this forward. |
Closing due to obvious lack of interest. |
Is it possible to workaround the reserved files names mentioned in #1393 using sparse-checkouts? |
Absolutely.
Wait, what? You cannot |
|
So the clone actually works, the checkout fails (because the offending files haven't been excluded, nothing has been excluded, actually). |
I didn't intend to make it sound like According to the documentation
If I perform the
On Linux the file 'drivers/gpu/drm/nouveau/nvkm/subdev/i2c/aux.c' seems to be excluded. Are these examples then incorrect on how to use spare-checkout? Can you offer some guidance on how to perform the exclusion of the proper files? |
It is good to see that this file was created, I must have missed that fact earlier. This looks good, the problem is that we do not even allow such files with invalid names to enter the Git index, I think. When that patch was developed, we were under embargo and wanted to err on the side of safety: there are too many ways to write out files from the index, so it looked like a sensible thing to be strict even with the index. In your case, it might be too strict. As a quick workaround to get you unblocked, you can set |
@dscho Thanks for the help. On windows 10 I decided it was easier to use the Linux for Windows and to checkout the Linux kernel from within Ubuntu-18.04. Then from within Ubuntu-18.04 you can run 'explorer.exe .' and explorer will open up as "\wsl$\Ubuntu-18.04\home\fdk17\linux_sparse". |
Another option would be to use msys2 and clone from there, afterwards you can use the folder from Windows. Example here how to install msys2: https://lazyprogrammer.io/entry/lazy-build-qemu-img-exe-statically-from-source |
Due to |
is this problem solved? why is it closed? |
@mfide you probably missed #2046 (comment) while reading this thread (it is long, I admit), which details a way forward. If anybody is interested enough in fixing this, the information is all right there to work on it. |
Setup
defaults?
to the issue you're seeing?
No.
Details
PowerShell or CMD, same issue
Minimal, Complete, and Verifiable example
this will help us understand the issue.
git clone to finish correctly (exit code 0)
error: unable to create file drivers/gpu/drm/nouveau/nvkm/subdev/i2c/aux.c: No such file or directory
error: unable to create file drivers/gpu/drm/nouveau/nvkm/subdev/i2c/aux.h: No such file or directory
error: unable to create file include/soc/arc/aux.h: No such file or directory
URL to that repository to help us with testing?
https://github.com/torvalds/linux
-- ls.exe version
-- touch.exe version
The text was updated successfully, but these errors were encountered: