What happens when I clone a repository with symlinks on Windows?

前端 未结 3 524
清歌不尽
清歌不尽 2020-11-29 04:15

There\'s been a lot of questions about adding support for symlinks on Windows. But, what actually happens when I clone a repository with symlinks on Windows?

3条回答
  •  南笙
    南笙 (楼主)
    2020-11-29 05:02

    I have been working on Symlink support in msysgit here:

    https://github.com/frogonwheels/git (branch mrg/symlink-v* .. currently v2)

    The tests do not run to completion yet, and I have limited time in which to work on it, and no real short-term goal to motivate me. It'd be nice to be able to use projects like git-annex under msysgit.

    My work is hampered by the lack of symlink support in the msys shell as well.

    There's a command-line for granting the privileges that is suggested by the cygwin ln command. (You will need to run this as administrator).

    editrights -a SeCreateSymbolicLinkPrivilege -a $YOUR_USER

    The whole problem of Directory vs file symlinks is a biggie.

    At the moment I'm of the opinion that as much as we can, we limit ourselves to making File symlinks work... and not allow directory symlinks in msysgit. It's not ideal, but the reality is that any solution is a bit of a cludge, trying to impose possix linking onto the realities of the NTFS incompatibilities with possix linking is just painful.

    We can try and detect whether the target is file or directory, but I can think of a few issues with that just off the top of my head - especially the whole problem of which order the entities get created.

提交回复
热议问题