-
Notifications
You must be signed in to change notification settings - Fork 889
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
Invalid Path on Long File Paths for .net applications with long path support #1805
Comments
Actually I noticed that this isn't supported by libgit2 yet, but there is a pending pull request for it so it may come soon. |
This is probably also related/duplicate of the underlying problem in #1374 |
@japj It's this one libgit2/libgit2#5347 |
Fix #2120 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reproduction steps
On Windows 10 (or any windows OS that supports long file paths, with Enable Win32 Long Paths enabled)
Create a file path more than 260 characters long
Create a .net application using a version of .net framework of 4.6.2 or newer, and add an application manifest to enables support for long file paths.
Call the Commands.Stage on this repo, adding all files.
An invalid path exception will be thrown indicating the path is too long.
Running "git add ." from the command line works as long as the core.longpaths=true config option is set in git, but the .net application still fails with this exception.
The system gitconfig looks as follows:
Expected behavior
Commands.Stage should add all the files to the index, as long as the file paths are less than 4096 characters.
Actual behavior
An InvalidPath exception is thrown:
Version of LibGit2Sharp (release number or SHA1)
0.26.2.97
Operating system(s) tested; .NET runtime tested
Windows Server 2019 Datacenter Edition, .NET Framework 4.7.2
The text was updated successfully, but these errors were encountered: