Web lists-archives.com

Re: Cygwin Git with Windows paths

On 2018-11-18 01:35, Ray Donnelly wrote:
> On Sun, Nov 18, 2018, 6:07 AM Steven Penny <svnpenn@xxxxxxxxx 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

Use cygpath:

$ git clone git://github.com/benhoyt/goawk `cygpath 'C:\cygwin64\tmp\goawk'`

>> and mixed form:
>> $ git clone git://github.com/benhoyt/goawk C:/cygwin64/tmp/goawk

$ git clone git://github.com/benhoyt/goawk $(cygpath 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

If Windows paths work, that's convenient; if Windows paths don't work, use
cygpath, as it is often required, that's why it's available.

>> This causes problems for any non-Cygwin tools that might call Git:
>> http://github.com/golang/go/issues/23155

> This is very much the point of msys2.

Also Git for Windows (MinGW based) which tries to provide a more compatible
experience without msys2 DLLs; and which can also be installed under msys2.

Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.

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