git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] git-new-workdir: add windows compatibility

From
Karsten Blees <karsten.blees@gmail.com>
Date
May 26, 2015, 16:48 UTC
Message-ID
<5564A3F7.8030305@gmail.com>
In-Reply-To
<xmqqfv6k7zp3.fsf@gitster.dls.corp.google.com>
Am 26.05.2015 um 06:03 schrieb Junio C Hamano:
Show 15 quoted lines
> Daniel Smith <dansmith65@gmail.com> writes:
> 
>> 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
>>
> 
> 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.
> 
mklink:
 - is not available on Windows XP
 - requires special permissions
 - does not work on network shares (unless enabled via 'fsutil behavior')
 - only works on file systems that support reparse points (e.g. NTFS, not FAT)
AFAICT, the MSys2 symlink() implementation is pretty smart to detect these conditions and fall back to deep copy (aka 'cp -a') if symlinks are not supported.
IOW, using 'ln -s' will hopefully "just work" in the upcoming Git for Windows 2, thus trying to fix it for MSys1 / Git for Windows 1.9x is probably a lost cause.
Karsten
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 8 of 9 in “Re: [PATCH] git-new-workdir: add windows compatibility”
  1. Junio C HamanoMay 26, 2015
  2. Johannes SchindelinMay 26, 2015
  3. Paul SmithMay 26, 2015
  4. Johannes SchindelinMay 26, 2015
  5. Michael J GruberMay 29, 2015
  6. Duy NguyenMay 29, 2015
  7. Johannes SchindelinMay 29, 2015
  8. Karsten BleesMay 26, 2015
  9. Johannes SchindelinMay 27, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.