{"thread":{"id":"35369","subject":"Bug: Pathspec parsing on Windows fails when branch specified","startedAt":"2013-11-20T21:09:26Z","lastAt":"2013-11-20T22:12:37Z","messageCount":2,"participants":["Eris Belew","Johannes Sixt"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"230859","messageId":"CAM8h_A_zfX4U8hGxiw3_79zMZXmcTN3CPRUcrtsQTQdD4RaMhQ@mail.gmail.com","threadId":"35369","inReplyTo":null,"subject":"Bug: Pathspec parsing on Windows fails when branch specified","fromName":"Eris Belew","fromEmail":"erisrenee@gmail.com","sentAt":"2013-11-20T21:09:26Z","receivedAt":"2013-11-20T21:09:26Z","isPatch":false,"sender":{"key":"erisrenee@gmail.com","avatar":null},"body":"System: Windows Server 2008 R2\nGit: git version 1.8.4.msysgit.0\nShell: Powershell V3 (No third-party modules loaded)\n\nSummary:\n  When specifying a pathspec including a branch/commit, path separator\ncharacters are not translated. Since tab-completion in windows shells (ex:\nCMD, PowerShell, not unix-style shells running on windows) uses the windows\npath separator, and other git commands work fine with the windows path\nseparator, the expected behavior would be to translate for me.\n\nReproduction:\n    git diff BRANCH:path\\to\\file path\\to\\file\n\nResult:\n    fatal: Path 'path\\to\\file' does not exist in 'BRANCH'\n\nExpected:\n    Normal diff operation\n\nWorkaround:\n    Manually convert pathspec. Examples of working command:\n        git diff BRANCH:path/to/file path\\to\\otherfile\n        git diff BRANCH:path/to/file path/to/otherfile\n\n\nThanks,\n\nEris\n"},{"id":"230867","messageId":"528D33D5.4090507@kdbg.org","threadId":"35369","inReplyTo":"CAM8h_A_zfX4U8hGxiw3_79zMZXmcTN3CPRUcrtsQTQdD4RaMhQ@mail.gmail.com","subject":"Re: Bug: Pathspec parsing on Windows fails when branch specified","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2013-11-20T22:12:37Z","receivedAt":"2013-11-20T22:12:37Z","isPatch":false,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Am 20.11.2013 22:09, schrieb Eris Belew:\n> System: Windows Server 2008 R2\n> Git: git version 1.8.4.msysgit.0\n> Shell: Powershell V3 (No third-party modules loaded)\n> \n> Summary:\n>   When specifying a pathspec including a branch/commit, path separator\n> characters are not translated. Since tab-completion in windows shells (ex:\n> CMD, PowerShell, not unix-style shells running on windows) uses the windows\n> path separator, and other git commands work fine with the windows path\n> separator, the expected behavior would be to translate for me.\n> \n> Reproduction:\n>     git diff BRANCH:path\\to\\file path\\to\\file\n> \n> Result:\n>     fatal: Path 'path\\to\\file' does not exist in 'BRANCH'\n> \n> Expected:\n>     Normal diff operation\n> \n> Workaround:\n>     Manually convert pathspec. Examples of working command:\n>         git diff BRANCH:path/to/file path\\to\\otherfile\n>         git diff BRANCH:path/to/file path/to/otherfile\n\nThat's not a bug, it is expected behavior. \"BRANCH:path/to/file\" is not\n\"file on disk\" syntax, but Git's syntax to reference a particular object\nin the database. For this reason, forward-slashes are mandated; there is\nno option to use backslashes in this case.\n\nBackslashes could actually be part of directory and file names in the\ndatabase. It would be impossible to check out a tree with such names on\nWindows, obviously.\n\n-- Hannes\n"}]}