Skip to content

Symlink Implementation

frogonwheels edited this page Feb 9, 2013 · 7 revisions

What are the plans for Symlink support?

Currently what has been implemented is basic symlink support. It passes a good deal of the tests as it is, but relies on modifications to the test scripts that override the shell commands that deal with symbolic links.

My current 'failure point' is unzip of a file containing a symlink, which highlights the need for real symlink support in msys/mingw libraries.

I believe we would do well to follow the Cygwin implementation as proposed by James Gregurich. This uses NTFS symlinks as available, but will fail-over to using a special file.

(Cygwin puts a) a byte sequence at the front of the file as a a special identifier. It sets a property on the file to make it appear as a system file so that it appears special in the Explorer

There are three main points where this fail-over could happen.

  1. Where there is no support on the filesystem for symlinks

  2. Where permissions prevent the creation of symlinks

  3. Where git is unable to determine if the target of the link is a file or directory. (Though, conceivably we could just fail to using file-links in this case).

I understand that this is fine while working in the Msys shell, but that outside that would be next to useless, however a simple script could convert any 'faked' symlinks. Even better if we could use git to get a list of all symlinks in the currently checked out commit.

Known Breakages introduced

  1. t5000-tar-tree.sh Due to tar/unzip implementations

TODO

  1. Fail-over code

  2. Provide a bash and gnu utilities that support symbolic links

  3. Fill out the howto

Clone this wiki locally