-
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
ln -s copies instead of links #171
Comments
Running |
Good point! I guess we should set this environment variable (unless it is already set) in |
Personally, that's the behavior I would expect. The only caveat is that it will fail with a permissions error if not run as an administrator. |
IMO symlinks have too many caveats on Windows to enable this by default. So users should enable this explicitly if they know what they are doing. |
Would I assume that runs when |
What about |
Personally, I would be in favor of adding this as a checkbox in the "experimental options" page of the installer. Not quite sure about the best way to implement it (and I'll only get a chance to work on this in more than a week from now, anyway, so feel free to come up with a Pull Request). |
BTW: The release notes clearly states how to enable the symlink support: git-for-windows/build-extra@1999a58#diff-b1c84271dad23463aa793956bdbbcb6b. So this is not really an issue. Fiddling with the environment within the installer might be not such a good idea. What if someone wants to restrict symlink support for a specific set of repos? If we leave enabling of that feature to the developer, she can fine-tune the setting to her liking. |
@dansmith65 BTW I kind of thought that you would take ownership of this issue. Would be a nice gesture if you looked at the wiki page how to make an installer, then at the commit adding the experimental options and then came up with a Pull Request that adds another check box (off by default) to set the Ideally, this environment variable would be set in |
I don't think this should be exposed as an installer option. Windows symlinks just have too many pitfalls to explain in an installer page. Its also not an "experimental" feature in the sense that these problems will disappear with enough testing. IMO a Wiki page / FAQ entry would be the best option (similar to long paths). |
Heh... If my experience taught me that people read the Wiki or the FAQ, I would agree. Wholeheartedly! Alas, my experience tells me that people do not read the Wiki... So I am actually in favor of renaming the "experimental features" page and adding both the "symlink emulation" and "long paths" checkboxes (both off by default, of course). In the description we can always link to the Wiki... |
In contrast to fscache, symlinks neither work on all platforms nor for all users nor on all file systems. Exposing this in the installer gives blindfolded admins the option to shoot their users in the foot. Until now I was under the impression that we need to set the Therefore I'm closing this issue as not git related. How to enable symlinks in MSYS has long been answered (even by the original poster). Requests to make |
Which is why the checkbox would be guarded by the condition that the Windows version must be new enough (and if it is easy to implement in InnoSetup, also the condition that the NTFS junction permissions are not limited to administrators). If either of those conditions would not be met, we would hide that checkbox.
This is a really good point, thanks for mentioning it! I just verified that even subtree (which is in Note, however, that Having said all that, I am fine with leaving this ticket closed. If anybody is motivated to add that installer page, I would be happy to accept that contribution, of course ;-) |
@dscho Personally, I use the portable version, so I'm not inclined to write the code to add this option to the installer. Knowing I can manually set the MSYS environment variable is good enough for me. |
…reamable version I'm creating this PR for a fourth time (see git-for-windows#163, git-for-windows#171, and git-for-windows#178 for earlier versions). This version is tracking my progress to create something that can be sent as an RFC upstream, but also can be used to start the sparse feature branch. This is based on v2.23.0. Note: I currently have conflicts with the virtual filesystem feature, and I'll resolve those with a merge commit when I'm ready. I'm just creating this for tracking progress at the moment, but can also be a place for early feedback. * git sparse-checkout disable to disable the sparse-checkout feature and return to a full checkout. * git sparse-checkout init --cone, to initialize in cone mode. * git sparse-checkout add when core.sparseCheckout=cone. This includes performance improvements with the hashset-based matching algorithm, but I'll leave further enhancements as smaller steps on top. Here are a few things I want to try: Track the maximum depth of a prefix pattern, so we know to not run hashes for deeper paths. Use the "known exclude" bit in cone mode to stop hashing paths we know will not be included. Use the "known include" bit in cone mode to stop hashing paths we know will be included. This is more difficult than "known exclude" because we need to distinguish directories from files when doing path matches so we don't give a directory a "known include" when it isn't a recursive pattern match.
v2.4.2.windows.1 (64 bit, portable install, if that matters), run from an elevated command prompt on Windows 8.1
ln -s src dest
will create a copy ofdest
and name itsrc
whereas
cmd.exe /c "mklink /d dest src"
will create a directory junctionI'm mentioning this because my understanding is this version is supposed to be able to intelligently choose the best method of creating a symbolic link on Windows, but it doesn't seem to be doing that in my case.
The text was updated successfully, but these errors were encountered: