Re: [PATCH] git-new-workdir: add windows compatibility
From: Johannes Schindelin <hidden>
Date: 2016-06-15 23:04:55
Hi, On 2015-05-26 06:03, Junio C Hamano wrote:
Daniel Smith [off-list ref] writes:quoted
When running on Windows in MinGW, creating symbolic links via ln always failed. Using mklink instead of ln is the recommended method of creating links on Windows: http://stackoverflow.com/questions/18641864/git-bash-shell-fails-to-create-symbolic-links Script now branches on Windows to use mklink. This change should not affect unix systems. Signed-off-by: Daniel Smith <redacted> Has been tested on Windows 8.1 and OS X Yosemite. ---Swap the "Has been tested..." and "Signed-off-by:" lines. I'll defer to Windows folks if "mklink" is a sensible thing to use or not; I have no first-hand experience with Windows, but only heard that links are for admin user only or something like that, so I want to hear from people whose judgement on Windows matters I trust.
The biggest problem with `mklink` is that it is only supported on Windows Vista and later, while I really like to keep Windows XP support in Git for Windows. That is why Karsten Blees' symlink support (emulated via NTFS reparse points) which I just merged into Git for Windows yesterday is so careful about everything. But git-new-workdir is in `contrib/`, anyway, and not installed in Git for Windows by default, therefore it is less critical: interested parties will have to be a bit knowledgeable in any case. So I am fine with it! Ciao, Dscho