-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
git warns "could not open directory: Function not implemented" when encountering junctions with very long paths #2659
Comments
I think this use case might work if you set |
Unfortunately not -- I've tested with |
I did some digging. |
I did some more digging. Windows explorer also doesn't like the junction point Turns out Node normalizes these to absolute paths in 8.3 format. Windows does not like those 8.3 symlinks. |
So this is not a Git issue, but a node.js issue? |
Thank you for your investigation. I've done some more testing here and realise that despite all my care, sl.js is actually doing something dumb: in the Apologies for the false trail. I'm not sure that there is any issue in node.js at this point either. I will close this issue and continue to research the 'No such file or directory' issue I mentioned above (if I come up with anything I will throw a link to the new issue in here). |
Possibly vaguely related: #607, #1270?
Setup
Windows 10 1909 64-bit.
defaults?
Note: the issue presents identically, whether or not
core.symlinks
istrue
orfalse
.to the issue you're seeing?
Using NPM with long paths and junctions (e.g.
npm link
).Details
Either Bash or CMD. Not tested in PowerShell.
Minimal, Complete, and Verifiable example
this will help us understand the issue.
MCVE: https://github.com/mcdurdin/git-windows-junction-longpath-error
This relies on a small node script to generate the junction with a long path because mklink does not yet support long paths. This simulates the issue we are seeing with
npm link
ultimately callingfs.symlink(target, link, 'junction')
.sl.js contents:
This same error crops up with a number of other commands, such as
git clean -fdx
orgit add
. We have also seen what may be a related issue (on another repo), where git warns, for example:These paths contain nested junctions (no cycles as far as I can tell) and some of the full paths within those junctions hit the 260 character limit for traditional Windows paths. This however is proving much harder to reproduce in a standalone repository, so I refer to this mainly as it was the trigger for creating the MCVE.
URL to that repository to help us with testing?
https://github.com/mcdurdin/git-windows-junction-longpath-error
The repo https://github.com/keymanapp/keyman can trigger this issue as well but it's not trivial to get it into the state required to reproduce the problem. If the two issues don't end up with the same root cause (that is, a fix for the first issue doesn't make the second one go away...), then I will try again to create an MCVE for the 'No such file or directory' issue.
The text was updated successfully, but these errors were encountered: