This is the mail archive of the
mailing list for the Cygwin project.
Re: git and absolute Windows-style paths
- From: Adam Dinwoodie <adam at dinwoodie dot org>
- To: cygwin at cygwin dot com
- Date: Wed, 20 Apr 2016 10:00:06 +0100
- Subject: Re: git and absolute Windows-style paths
- Authentication-results: sourceware.org; auth=none
- References: <57169662 dot 9060503 at gmail dot com> <892b8f62-266a-da20-c8f4-4b2b82a66c39 at gmail dot com> <5716A9FA dot 6020407 at cornell dot edu>
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:
> >>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.
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple