This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Cygwin Git with Windows paths
- From: Brian Inglis <Brian dot Inglis at SystematicSw dot ab dot ca>
- To: cygwin at cygwin dot com
- Date: Sun, 18 Nov 2018 09:49:17 -0700
- Subject: Re: Cygwin Git with Windows paths
- References: <5bf10195.1c69fb81.27494.eed4@mx.google.com> <CAOYw7duJhns_6s4Le34y7zAtfL7o9zwupG0qrb+X=4hcvxn2Xw@mail.gmail.com>
- Reply-to: Brian dot Inglis at SystematicSw dot ab dot ca
On 2018-11-18 01:35, Ray Donnelly wrote:
> On Sun, Nov 18, 2018, 6:07 AM Steven Penny <svnpenn@gmail.com 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