Re: git and absolute Windows-style paths

2016-04-21 Thread Andrey Repin
Greetings, Adam Dinwoodie! > On Wed, Apr 20, 2016 at 04:37:34PM -0400, Eliot Moss wrote: >> I think this will do it: >> >> function git { >> declare -a ARGS >> for n in "$@" ; do ARGS+=("$(cygpath -u -- "${n}")") ; done >> command git "${ARGS[@]}" >> } >> >> The reason this is a little

Re: git and absolute Windows-style paths

2016-04-21 Thread Ray Donnelly
On Thu, Apr 21, 2016 at 2:11 PM, Ray Donnelly wrote: > Here's a patch for git 2.8.1 that I wrote for MSYS2 to address the > same issue. Because I'd read this thread before I started working on > it (and generally since it's good to) I kept it in mind to make it > work for

Re: git and absolute Windows-style paths

2016-04-21 Thread Ray Donnelly
Here's a patch for git 2.8.1 that I wrote for MSYS2 to address the same issue. Because I'd read this thread before I started working on it (and generally since it's good to) I kept it in mind to make it work for Cygwin in-case you wanted to use it:

Re: git and absolute Windows-style paths

2016-04-20 Thread Eliot Moss
On 4/20/2016 7:14 PM, Ernie Rael wrote: On 4/20/2016 1:37 PM, Eliot Moss wrote: I think this will do it: function git { declare -a ARGS for n in "$@" ; do ARGS+=("$(cygpath -u -- "${n}")") ; done command git "${ARGS[@]}" } The reason this is a little more complicated than some other

Re: git and absolute Windows-style paths

2016-04-20 Thread Ernie Rael
On 4/20/2016 1:37 PM, Eliot Moss wrote: I think this will do it: function git { declare -a ARGS for n in "$@" ; do ARGS+=("$(cygpath -u -- "${n}")") ; done command git "${ARGS[@]}" } The reason this is a little more complicated than some other approaches might be is that it will also

Re: git and absolute Windows-style paths

2016-04-20 Thread Adam Dinwoodie
On Wed, Apr 20, 2016 at 04:37:34PM -0400, Eliot Moss wrote: > I think this will do it: > > function git { > declare -a ARGS > for n in "$@" ; do ARGS+=("$(cygpath -u -- "${n}")") ; done > command git "${ARGS[@]}" > } > > The reason this is a little more complicated than some other

Re: git and absolute Windows-style paths

2016-04-20 Thread Eliot Moss
I think this will do it: function git { declare -a ARGS for n in "$@" ; do ARGS+=("$(cygpath -u -- "${n}")") ; done command git "${ARGS[@]}" } The reason this is a little more complicated than some other approaches might be is that it will also work for arguments that have space, e.g.,

Re: git and absolute Windows-style paths

2016-04-20 Thread Ernie Rael
_ From: cygwin-ow...@cygwin.com <cygwin-ow...@cygwin.com> on behalf of Eliot Moss <m...@cs.umass.edu> Sent: Wednesday, April 20, 2016 8:52 AM To: cygwin@cygwin.com Subject: Re: git and absolute Windows-style paths On 4/20/2016 11:44 AM, silverwind wrote: Hey, Does it work if you do

Re: git and absolute Windows-style paths

2016-04-20 Thread Adam Dinwoodie
On Wed, Apr 20, 2016 at 05:44:47PM +0200, silverwind wrote: > > I can't immediately see what's going wrong, so I'm going to report > this upstream. > > Thanks. I came upon this issue through npm which is using these > Windows paths for certain git operations. Unfortunately, The npm > team is very

Re: git and absolute Windows-style paths

2016-04-20 Thread silverwind
Hey, I think that tackling this with a script/function is a better approach ... That's seems like a bandaid solution from which the general user base would not be able to profit. I think a floating patch to Cygwin's git package would be more appropriate, unless it can be addressed in

Re: git and absolute Windows-style paths

2016-04-20 Thread Brian Clifton
fi done command git "$@" } # From: cygwin-ow...@cygwin.com <cygwin-ow...@cygwin.com> on behalf of Eliot Moss <m...@cs.umass.edu> Sent: Wednesday, April 20, 2016 8:52 AM To: cygwin@cygwin.com Subject: Re: git and absolute Windows-style paths On 4/20/2016 11:44 AM,

Re: git and absolute Windows-style paths

2016-04-20 Thread Eliot Moss
On 4/20/2016 11:44 AM, silverwind wrote: Hey, Does it work if you do: git add c:/test/file Nope, won't work either. No file is added, exit code 0 is given. > I can't immediately see what's going wrong, so I'm going to report this upstream. Thanks. I came upon this issue through npm

Re: git and absolute Windows-style paths

2016-04-20 Thread silverwind
Hey, Does it work if you do: git add c:/test/file Nope, won't work either. No file is added, exit code 0 is given. > I can't immediately see what's going wrong, so I'm going to report this upstream. Thanks. I came upon this issue through npm which is using these Windows paths for

Re: git and absolute Windows-style paths

2016-04-20 Thread Adam Dinwoodie
On Tue, Apr 19, 2016 at 05:58:18PM -0400, Ken Brown wrote: > On 4/19/2016 5:31 PM, Marco Atzeri wrote: > >On 19/04/2016 22:34, silverwind wrote: > >>Hey, > >> > >>I noticed that Cygwin's git does not seem to correctly process > >>Windows-style paths in at least v2.7.4 and v2.8.1. It may have

RE: git and absolute Windows-style paths

2016-04-19 Thread Bill Smith
> $ git add C:\\test\\file <-- this fails despite exit code 0 [Bill Smith] Does it work if you do: git add c:/test/file We use the mixed mode paths extensively with Cygwin in our environment and it works well. We have the issue of having to work with non-Cygwin aware Windows

Re: git and absolute Windows-style paths

2016-04-19 Thread Ken Brown
On 4/19/2016 5:31 PM, Marco Atzeri wrote: On 19/04/2016 22:34, silverwind wrote: Hey, I noticed that Cygwin's git does not seem to correctly process Windows-style paths in at least v2.7.4 and v2.8.1. It may have worked before, but I'm not totally certain. don't assume cygwin programs are

Re: git and absolute Windows-style paths

2016-04-19 Thread Marco Atzeri
On 19/04/2016 22:34, silverwind wrote: Hey, I noticed that Cygwin's git does not seem to correctly process Windows-style paths in at least v2.7.4 and v2.8.1. It may have worked before, but I'm not totally certain. don't assume cygwin programs are able to process windows path. Most don't. Use

git and absolute Windows-style paths

2016-04-19 Thread silverwind
Hey, I noticed that Cygwin's git does not seem to correctly process Windows-style paths in at least v2.7.4 and v2.8.1. It may have worked before, but I'm not totally certain. Interestingly, a command like "git add" still sets an 0 exit code despite the apparent failure. Could it be that