Re: Windows symlinks
- From
Jakub Narebski <jnareb@gmail.com>
- Date
- Jun 24, 2008, 23:28 UTC
- Message-ID
- <m3od5qjtv1.fsf@localhost.localdomain>
- In-Reply-To
- <911589C97062424796D53B625CEC0025E4618F@USCOBRMFA-SE-70.northamerica.cexp.com>
Patrick Higgins <Patrick.Higgins@cexp.com> writes:
> It looks like one of the bigger (biggest?) hurdles for git adoption > at my company is going to be handling symlinks on Windows. We may be > able to sidestep the issue [...] by [...] run[ning] Linux > in a virtual machine [...]
If only MS Windows supported other filesystems which have symlinks...
Show 13 quoted lines
> Has anyone thought about a way for git to handle symlinks? Vista > seems to have added native symlinks, but you need have elevated > privilege to create them. NTFS junction points seem helpful for > older versions of Windows, but don't work for anything except > directories, and seem to be dangerous to use with tools that do > recursive deletes. Neither junction points nor native symlinks sound > like great options. > > Cygwin's clever symlink trick seems to work pretty well in > practice. I'm not exactly sure what it's doing, but it seems to > create a shortcut that it's own programs understand. Some other > non-Cygwin programs seem to understand them, too, but Java does not > which is a big problem for me.
First, I think that both "git on Windows" solutions, namely Cygwin and msysGit port, don't use symlinks either in installed programs, nor in repository layout.
Second, the problem there can be _only_ if your repository contains (or contained) symlinks, and then it is your own damn fault. I don't know how Cygwin, or msysGit deals with symlinks in a wirking directory, but you can work around symlinks (although in a bit unwieldy way) by using `core.symlinks' configuration variable; see git-config(1):
core.symlinks::
If false, symbolic links are checked out as small plain files
that contain the link text. git-update-index(1) and git-add(1)
will not change the recorded type to regular file. Useful on
filesystems like FAT that do not support symbolic links. True
by default.-- Jakub Narebski Poland ShadeHawk on #git