From: Adam Dinwoodie <adam@dinwoodie.org>
To: git@vger.kernel.org
Subject: Silent failure to add Windows-style paths in Cygwin Git
Date: Wed, 20 Apr 2016 10:17:47 +0100 [thread overview]
Message-ID: <20160420091747.GH2345@dinwoodie.org> (raw)
If I attempt to `git add` an extant file specified using a Windows-style
path on Cygwin Git, this doesn't add the file, and produces no error
message:
$ pwd # As seen by Cygwin
/cygdrive/c/tmp
$ cygpath -aw . # As seen by Windows
C:\tmp
$ git init
Initialized empty Git repository in /cygdrive/c/tmp/.git/
$ git add 'c:\tmp\file' || echo non-zero exit code # Errors out as expected
fatal: pathspec 'c:\tmp\file' did not match any files
non-zero exit code
$ touch file
$ git add 'c:\tmp\file' || echo non-zero exit code # No error this time...
$ git status # ...even though the file didn't get added
On branch master
Initial commit
Untracked files:
(use "git add <file>..." to include in what will be committed)
file
nothing added to commit but untracked files present (use "git add" to track)
I wouldn't expect adding the file to actually succeed, but I would
expect it to either succeed or produce an error, rather than silently
failing.
Experimentation shows I get the same behaviour for 'c:\tmp\file',
'c:/tmp/file' and 'subdir\file'. I'm seeing this on v2.8.0; the
downstream report says the same behaviour occurs on v2.7.4[0], and I've
also seen what appears to be the same behaviour on a v2.0.5 build I
produced to check.
Adam
[0]: https://cygwin.com/ml/cygwin/2016-04/msg00474.html
next reply other threads:[~2016-04-20 9:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-20 9:17 Adam Dinwoodie [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-04-25 12:07 Silent failure to add Windows-style paths in Cygwin Git Adam Dinwoodie
2016-04-25 12:18 ` Duy Nguyen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160420091747.GH2345@dinwoodie.org \
--to=adam@dinwoodie.org \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).