Re: Cygwin Git with Windows paths
On 11/27/2018 3:11 AM, Marco Atzeri wrote: Cool down please. If you need a git that understand windows paths you should not use the cygwin one. It is this stance that caused MSYS to exist. It is this stance that caused the git developers to choose MSYS for the Windows support model. However, it is correct to say, when in Cygwin use POSIX paths as Windows paths are not warranted to work. The \ character may even cause a `\t' to be or a \m to be a , etc. as that is what is described by POSIX. And 'C:/' in POSIX speak refers to a directory in the current working directory named `C:'. But Cygwin tries to be nice and play with the strings beginning with [A-Za-z] followed by : as a device designation but if it works it works and if it doesn't work it doesn't work; you must live with the results and work (around) them as needed. To work around the issues I often use /etc/fstab to create a mount point for a troublesome Windows style path. I can then use the POSIX format to alleviate the issue. -- cyg Simple -- 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
Re: Cygwin Git with Windows paths
Greetings, Adam Dinwoodie! > 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. The problem with Git is that it relies on entire POSIX ecosystem, contrary to, say, Subversion, which is just one drop-in binary. > 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. Then it would just make Cygwin as useless as WSL. > 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. -- With best regards, Andrey Repin Tuesday, November 27, 2018 17:33:24 Sorry for my terrible english... -- 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
Re: Cygwin Git with Windows paths
I agree this may not be a bug as such but would VERY much like it fixed. In extreme cases I have to resort to rsync in/out of WSL to do builds or make sure to only do relative paths. That there already is a patch set should make this an easy think to undertake. -- 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
Re: Cygwin Git with Windows paths
Am 27.11.2018 um 02:09 schrieb Steven Penny: On Mon, 26 Nov 2018 22:54:14, Adam Dinwoodie wrote: 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. It is a bug. Even when you use Unix paths, Cygwin is doing path conversions: $ ls /var cache lib log run tmp $ strace ls /var | grep -E '(conv_to|normalize)_(posix|win32)_path' | wc 32 320 3337 It is not a bug, and you are misunderstanding these calls. Of course the internal of cygwin need to convert the posix to win32 call, as the true kernel is Windows and the cygwin1.dll is the library responsable for the interface. So either this code should be pulled out of the Cygwin DLL, or people should stop saying that its not supported. Cool down please. If you need a git that understand windows paths you should not use the cygwin one. Regards Marco --- Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft. https://www.avast.com/antivirus -- 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
Re: Cygwin Git with Windows paths
> On Nov 27, 2018, at 8:09 AM, Steven Penny wrote: > > On Mon, 26 Nov 2018 22:54:14, Adam Dinwoodie wrote: >> 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. > > It is a bug. Even when you use Unix paths, Cygwin is doing path conversions: It's not a bug. Cygwin has been on record for a very long time that Windows paths might work, but since it's emulating Linux, they are not guaranteed to work. If they work, great. If they don't work, too bad. Some maintainers try to keep them working in their respective programs, but that is a courtesy, not fixing a bug. -- 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
Re: Cygwin Git with Windows paths
On Mon, 26 Nov 2018 22:54:14, Adam Dinwoodie wrote: 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. It is a bug. Even when you use Unix paths, Cygwin is doing path conversions: $ ls /var cache lib log run tmp $ strace ls /var | grep -E '(conv_to|normalize)_(posix|win32)_path' | wc 32 3203337 So either this code should be pulled out of the Cygwin DLL, or people should stop saying that its not supported. 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. Its not fixed upstream (yet), but a patch is available that fixes the issue: http://public-inbox.org/git/20181126173252.1558-1-tbo...@web.de Note carefully that Windows path handling previously worked with Cygwin Git until Dec 2016, when a patch was introduced that broke that use case. The patch in question repairs the path handling so that Unix and Windows paths are both supported with Cygwin Git again. -- 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
Re: Cygwin Git with Windows paths
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
Re: Cygwin Git with Windows paths
On 11/18/2018 1:07 AM, 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 What exactly are you trying to solve by your query? The golang issue you point to is marked as resolved and many suggestions similar to the ones you've been given in this query exist in it; including a go script to convert the strings on the command line. I probably would use a similar method with a bash script but calling cygpath. Good luck, -- cyg Simple -- 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
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 > 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
Re: Cygwin Git with Windows paths
This is very much the point of msys2. On Sun, Nov 18, 2018, 6:07 AM Steven Penny 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 > > > -- > 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 > > -- 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
Cygwin Git with Windows paths
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 -- 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