{"thread":{"id":"42137","subject":"Silent failure to add Windows-style paths in Cygwin Git","startedAt":"2016-04-25T12:07:05Z","lastAt":"2016-04-25T12:18:14Z","messageCount":2,"participants":["Adam Dinwoodie","Duy Nguyen"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"284392","messageId":"20160425120705.GN2345@dinwoodie.org","threadId":"42137","inReplyTo":null,"subject":"Silent failure to add Windows-style paths in Cygwin Git","fromName":"Adam Dinwoodie","fromEmail":"adam@dinwoodie.org","sentAt":"2016-04-25T12:07:05Z","receivedAt":"2016-04-25T12:07:05Z","isPatch":false,"sender":{"key":"adam@dinwoodie.org","avatar":"https://avatars.githubusercontent.com/u/1397507?v=4"},"body":"[Resending as my initial attempt appears to have not made it to the\nlist.  Apologies if this results in a double-post.]\n\nIf I attempt to `git add` an extant file specified using a Windows-style\npath on Cygwin Git, this doesn't add the file, and produces no error\nmessage:\n\n    $ pwd  # As seen by Cygwin\n    /cygdrive/c/tmp\n\n    $ cygpath -aw .  # As seen by Windows\n    C:\\tmp\n\n    $ git init\n    Initialized empty Git repository in /cygdrive/c/tmp/.git/\n\n    $ git add 'c:\\tmp\\file' || echo non-zero exit code  # Errors out as expected\n    fatal: pathspec 'c:\\tmp\\file' did not match any files\n    non-zero exit code\n\n    $ touch file\n\n    $ git add 'c:\\tmp\\file' || echo non-zero exit code  # No error this time...\n\n    $ git status  # ...even though the file didn't get added\n    On branch master\n\n    Initial commit\n\n    Untracked files:\n      (use \"git add <file>...\" to include in what will be committed)\n\n            file\n\n    nothing added to commit but untracked files present (use \"git add\" to track)\n\nI wouldn't expect adding the file to actually succeed, but I would\nexpect it to either succeed or produce an error, rather than silently\nfailing.\n\nExperimentation shows I get the same behaviour for 'c:\\tmp\\file',\n'c:/tmp/file' and 'subdir\\file'.  I'm seeing this on v2.8.0; the\ndownstream report says the same behaviour occurs on v2.7.4[0], and I've\nalso seen what appears to be the same behaviour on a v2.0.5 build I\nproduced to check.\n\nAdam\n\n[0]: https://cygwin.com/ml/cygwin/2016-04/msg00474.html\n"},{"id":"284393","messageId":"CACsJy8CDbfKWYdXg1WtcCeZMGV2OwjgBzBgj56h87hes5Dom4g@mail.gmail.com","threadId":"42137","inReplyTo":"20160425120705.GN2345@dinwoodie.org","subject":"Re: Silent failure to add Windows-style paths in Cygwin Git","fromName":"Duy Nguyen","fromEmail":"pclouds@gmail.com","sentAt":"2016-04-25T12:18:14Z","receivedAt":"2016-04-25T12:18:14Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Mon, Apr 25, 2016 at 7:07 PM, Adam Dinwoodie <adam@dinwoodie.org> wrote:\n> [Resending as my initial attempt appears to have not made it to the\n> list.  Apologies if this results in a double-post.]\n>\n> If I attempt to `git add` an extant file specified using a Windows-style\n> path on Cygwin Git, this doesn't add the file, and produces no error\n> message:\n>\n>     ...\n>\n> I wouldn't expect adding the file to actually succeed, but I would\n> expect it to either succeed or produce an error, rather than silently\n> failing.\n>\n> Experimentation shows I get the same behaviour for 'c:\\tmp\\file',\n> 'c:/tmp/file' and 'subdir\\file'.  I'm seeing this on v2.8.0; the\n> downstream report says the same behaviour occurs on v2.7.4[0], and I've\n> also seen what appears to be the same behaviour on a v2.0.5 build I\n> produced to check.\n\nCan you try git-bisect if possible? An strace log may be helpful\notherwise (looks like strace is supported on cygwin, but I don't know\nto what level)\n-- \nDuy\n"}]}