-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Cloning Linux kernel code under Windows #4005
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
Related: #2803. The broader problem is not actually specific to Windows because it will require a change in core Git if we want to allow checking out files under a different name than they were recorded. Although that might not go over well: If you clone a repository such as the Linux kernel's, there is more than just Git that assumes that the file names are on disk as they were committed, e.g. the build system. In any case, you probably will want to start a discussion on the Git mailing list (send plain-text messages, HTML messages are dropped silently). |
"Works on my machine" is not really adequate if you run a project that's used by millions of users. |
You are right, I confirmed that on some other Win11 machines as well, obviously Microsoft had some improvement on the topic since Win10, but I couldn't find official statement for it. On the other side, case sensitive files and folders were already supported through a special flag which can be set for a folder via fsutil. I believed that with all those updates, windows file system is fully compatible with Linux Kernel Source code. I will do the further tests and post the results here. |
You just ran into some of the magic that is the Windows file naming convention. Specifically:
As far as I understand it these are reserved names and simply cannot be used as actual file names on Windows. They have a special meaning (backwards compatibility FTW) and will not (ever?) behave the way you want them to, i.e. as actual files. Specifically, Microsoft even says that simply appending a file extension won't save you from weird behaviour (as also apparent by your example) – so a CRLF-rewrite like feature would have to do something way, way different to keep track of that conversion. |
I've run into a similar issue with cloning a repo that has a branch named
Would it be possible for git to avoid this? |
Not at this time. Git initially stores all refs as "loose refs", i.e. as files in the file system, where the path is relative to the Git directory. |
I use git version 2.37.1.windows.1 on my Windows 10 Pro 64 bit machine with a NTFS partition.
I want to clone some Linux kernel code from git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
Then I added following lines in to .git/config and try to checkout to master again:
and then get following errors:
I know that
aux
is one of reserved word in Windows file system, but I wonder if git can manage the file names which are reserved automatically in a similar way they do with CR and LF? (for example it can replace the file name during cloning and committing)The text was updated successfully, but these errors were encountered: