-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
wsl: LongPath errors #11941
Comments
You run into the Windows path limitation. |
@gerhardol Thank you for the response. Yes, we stumbled upon the path limitation in Windows with git and hoped to circumvent it using wsl. There seems to be a support within GE, since the clone process in general is working (without the UNC prefix). The data is available and can be seen even with the windows file explorer. The strange thing is, that the added prefix by GE leads to an error (see 1.). Since just the opening of the repo afterwards with GE is not possible, I think it is not a wsl.exe or Windows issue. Does GE use a newer Windows API with LongPath support? Maybe I am also using GE wrong for the LongPath? I searched within the docu, but did not find anything for long path usage. Again, thank you very much for your time and support |
You can clone, then the path is just a parameter. When opening, the working directory is set that wsl.exe or GE does not like. |
wsl.exe may use long paths but it requires a registry patch: PS Microsoft.PowerShell.Core\FileSystem::\wsl$\ubuntu-20.04\home\user\gc\loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong\tmp_tests> dir
Mode LastWriteTime Length Name d----- 2024-10-07 22:47 .git PS However git.exe (that is used occasionally also in wsl) have limitations:
At line:1 char:1
PS WSL Git is OK: nothing to commit, working tree clean It is no point in enabling long paths in GE right now |
About the registry: About git.exe or wsl git: The issue really seems to be that it is not possible to launch any executable (even notepad.exe) if you are in a folder with more than 256 chars. |
|
Yes, this is true. Of course the provided example is synthetic. Nevertheless, we are using nested submodules with multiple layers and thus run into this issue. I have also created an issue @ git for windows. Unfortunately, the developers do not see a solution for the bash-based submodule feature ( git-for-windows/git#3372 and a partial solution git-for-windows/git#3877 ). Thus, the idea for the workaround to work with GE and wsl. |
The only explicit WinGit use I see is for custom diff and mergetools, using _gitWindowsCommandRunner/_gitWindowsExecutable. But changes are needed in the application too, some APIs need to be changed. I did not see what should be done to the stacktrace for this example (the manifest may have been incorrect though.) |
Environment
Issue description
Cloning a repository to a long path in wsl2 resides in two issues:
or
Steps to reproduce
Clone git to \wsl$\Ubuntu-24.04\home<user>\looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong
Did this work in previous version of GitExtensions?
No response
Diagnostics
No response
The text was updated successfully, but these errors were encountered: