This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: git and absolute Windows-style paths


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 worked
> >>before, but I'm not totally certain.
> >
> >don't assume cygwin programs are able to process windows path.
> >Most don't. Use Posix paths
> 
> But I think the OP is correct in pointing out that git should have
> given an error, as it does when a Posix path points to a
> non-existent file:
> 
> $ git add foo
> fatal: pathspec 'foo' did not match any files

I wouldn't expect Windows-style paths to work, but I agree that I'd
expect them to error out rather than silently fail.  I can't immediately
see what's going wrong, so I'm going to report this upstream.

Some data points, from some quick experimentation:

- `git add 'c:\tmp\file'` silently fails to add `file` if it exists.
- `git add 'c:\tmp\file'` correctly errors out if `file` doesn't exist.
- `git add 'subdir\file'` (i.e. using relative paths with back-slashes)
  has the same behaviour.
- `git add 'c:/tmp/file'` also shows the same behaviour.

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]