-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Issues with core.symlinks #310
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
Yes, this is intentional:
Your suggestions make a lot of sense, but are you prepared to follow up and do something about them? In other words, would you please follow the advice in https://github.com/git-for-windows/git/wiki/How-to-participate#fix-bugs-or-add-features-in-the-git-code-itself and in https://github.com/git-for-windows/git/wiki/Building-Git? |
I have recently been working on symlinks in another project (dra27/ocaml@eeece96 & dra27/ocaml@559747a) - is the semantics you refer to Windows' having separate directory and filename symlinks, or is there a further gotcha? (curiosity only!)
I can see why
Possibly - although probably not soon, alas! But it's helpful to know that the change would be considered useful, so I'll keep this on my ToDo list 😃 |
@dra27 I just invited you into the active team so I can assign this issue to you. |
@dra27 did you have any chance to work on this? |
@dra27 ping? |
@dra27 Regarding your first point: My utmost goal when adding symlink support was that with So |
@kblees I really appreciate your careful approach. IIRC we had a different approach before, and had to revert it wholesale because it caused real problems (#186 was a minor issue that was easily addressed, thanks to the excellent design of the |
@dra27 everything okay with you? |
@dscho - apologies, I missed the ping. Not had a chance to work on this yet - I'm afraid I really did mean "not soon". Should hopefully be able to get to this in late October. |
Not sure this is the best place for me to point this out, but I also have an issue with symlink'd folders that are specified in the .gitignore. The .gitignore lines for the symlinks aren't respected and the folders are shown as new items. |
@simonfox please be precise what kind of "symlink'd folders" you talk about. The best way to be precise is to state explicitly the command you used to create the symlinks. This is unfortunately necessary because people refer to two, very different things as "symlinks" in Windows. |
@dscho sorry... |
You really had to send me on a wild goose chase to find out whether junction points are created or whether Vista-style symlinks requiring admin privileges are created instead, didn't you 😛 |
node.js parses the symlink type here, and it is used here. The Such a symlink can be created using the And I cannot reproduce what you are claiming at all: as adminstrator, I created such a symlink in mklink /d a1 portable A Are you sure you want to continue to be parsimonious with your description of your problem? I did sink quite a bit into this issue with my research, so I am no longer willing to do all the bidding myself, and will require you to volunteer much more, including a Minimal, Complete & Verifiable Example if I am to spend any more time on assisting you to resolve your issues. |
@dscho again, please accept my apologies, it wasn't my intention to muck you around. I have determined the issue is caused by a trailing slash in the In If you require any further information or if you would like me to try anything else please let me know. |
That was because we did not support symlinks at all back then. So your symlink was mistaken for a directory, and the behavior you saw is consistent with that. Symlinks are not directories, however, so adding their name with a trailing slash to You will see the same behavior if you gitignore, say, |
The recent support for symbolic links is a great addition, though I've found two minor issues:
core.symlinks
isfalse
, you get an error message adding a native symlink (i.e. created by mklink) from the working directory:Is that intentional behaviour? While
core.symlinks = false
means that virtual files should be created by Git, is it necessary for Git to pretend it doesn't know how to read native symbolic links?2. If
core.symlinks
is true and the current user doesn't have SeCreateSymbolicLinkPrivilege (e.g. an administrator in an unelevated command prompt) then git checkout silently fails. Surely it should at least display a warning or preferably terminate with an error (as it would on a write failure, for example)? In both cases, the error could suggest changingcore.symlinks
tofalse
although it's also possible to detect if the user could obtain the privilege by elevation and in that instance it would be a good second suggestion.The text was updated successfully, but these errors were encountered: