{"thread":{"id":"42084","subject":"Silent failure to add Windows-style paths in Cygwin Git","startedAt":"2016-04-20T09:17:47Z","lastAt":"2016-04-20T09:17:47Z","messageCount":1,"participants":["Adam Dinwoodie"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"283920","messageId":"20160420091747.GH2345@dinwoodie.org","threadId":"42084","inReplyTo":null,"subject":"Silent failure to add Windows-style paths in Cygwin Git","fromName":"Adam Dinwoodie","fromEmail":"adam@dinwoodie.org","sentAt":"2016-04-20T09:17:47Z","receivedAt":"2016-04-20T09:17:47Z","isPatch":false,"sender":{"key":"adam@dinwoodie.org","avatar":"https://avatars.githubusercontent.com/u/1397507?v=4"},"body":"If 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"}]}