Cygwin Git with Windows paths
Adam Dinwoodie
adam@dinwoodie.org
Mon Nov 26 22:54:00 GMT 2018
On Sun, 18 Nov 2018 at 06:07, Steven Penny wrote:
>
> Cygwin Git can clone with Unix form paths:
>
> $ git clone git://github.com/benhoyt/goawk /tmp/goawk
> Cloning into '/tmp/goawk'...
> remote: Enumerating objects: 330, done.
>
> However it fails with Windows form:
>
> $ 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
>
> and mixed form:
>
> $ git clone git://github.com/benhoyt/goawk C:/cygwin64/tmp/goawk
> fatal: Invalid path '/home/Steven/C:/cygwin64': No such file or directory
>
> Note that other Cygwin programs work fine with these forms:
>
> $ ls 'C:\cygwin64'
> bin Cygwin.ico dev home sbin usr
> Cygwin.bat Cygwin-Terminal.ico etc lib tmp var
>
> This causes problems for any non-Cygwin tools that might call Git:
>
> http://github.com/golang/go/issues/23155
Personally, I don't see this as a bug; AIUI using Windows style paths
isn't something that is supported in general in Cygwin, even if it's
something that works in some circumstances. I acknowledge that this
causes problems for non-Cygwin tools using Cygwin Git, but the
solution there is to either use Cygwin aware/native versions of those
tools, or to use non-Cygwin versions of Git.
In particular, I'm wary of fixing this set of interop problem
introducing some other problem; I'd prefer Cygwin tools to fail to
handle Windows paths entirely than the current situation where "c:"
refers to a file of that exact name in the current directory, and
"c:\" sometimes refers to a completely different directory, when on
*nix systems in general both would refer to files in the current
directory.
I see you've raised this on the Git mailing list as well, and if the
upstream Git package starts to handle such paths, I'll take the
relevant patches. However since I don't consider this a bug, I'm not
going to raise it myself.
Adam
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin
mailing list