Cygwin programs can handle Unix form paths:

   $ ls /var
   cache  lib  log  run  tmp

and also Windows form paths:

   $ ls 'C:\cygwin64\var'
   cache  lib  log  run  tmp

However current Cygwin Git cannot:

   $ git clone git://github.com/benhoyt/goawk 'C:\cygwin64\tmp\goawk'
   Cloning into 'C:\cygwin64\tmp\goawk'...
   fatal: Invalid path '/home/Steven/C:\cygwin64\tmp\goawk': No such file or
   directory

It seems the problem is that Git thinks the Windows form path is relative
because it does not start with "/". A Git Bisect reveals this:

05b458c104708141d2fad211d79703b3b99cc5a8 is the first bad commit
commit 05b458c104708141d2fad211d79703b3b99cc5a8
Author: Brandon Williams <bmw...@google.com>
Date:   Mon Dec 12 10:16:52 2016 -0800

   real_path: resolve symlinks by hand

   The current implementation of real_path uses chdir() in order to resolve
   symlinks.  Unfortunately this isn't thread-safe as chdir() affects a
   process as a whole and not just an individual thread.  Instead perform
   the symlink resolution by hand so that the calls to chdir() can be
   removed, making real_path one step closer to being reentrant.

   Signed-off-by: Brandon Williams <bmw...@google.com>
   Signed-off-by: Junio C Hamano <gits...@pobox.com>

This causes problems for any non-Cygwin tools that might call Git:

http://github.com/golang/go/issues/23155

Reply via email to