* Bug: Pathspec parsing on Windows fails when branch specified
@ 2013-11-20 21:09 Eris Belew
2013-11-20 22:12 ` Johannes Sixt
0 siblings, 1 reply; 2+ messages in thread
From: Eris Belew @ 2013-11-20 21:09 UTC (permalink / raw)
To: git
System: Windows Server 2008 R2
Git: git version 1.8.4.msysgit.0
Shell: Powershell V3 (No third-party modules loaded)
Summary:
When specifying a pathspec including a branch/commit, path separator
characters are not translated. Since tab-completion in windows shells (ex:
CMD, PowerShell, not unix-style shells running on windows) uses the windows
path separator, and other git commands work fine with the windows path
separator, the expected behavior would be to translate for me.
Reproduction:
git diff BRANCH:path\to\file path\to\file
Result:
fatal: Path 'path\to\file' does not exist in 'BRANCH'
Expected:
Normal diff operation
Workaround:
Manually convert pathspec. Examples of working command:
git diff BRANCH:path/to/file path\to\otherfile
git diff BRANCH:path/to/file path/to/otherfile
Thanks,
Eris
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Bug: Pathspec parsing on Windows fails when branch specified
2013-11-20 21:09 Bug: Pathspec parsing on Windows fails when branch specified Eris Belew
@ 2013-11-20 22:12 ` Johannes Sixt
0 siblings, 0 replies; 2+ messages in thread
From: Johannes Sixt @ 2013-11-20 22:12 UTC (permalink / raw)
To: Eris Belew, git
Am 20.11.2013 22:09, schrieb Eris Belew:
> System: Windows Server 2008 R2
> Git: git version 1.8.4.msysgit.0
> Shell: Powershell V3 (No third-party modules loaded)
>
> Summary:
> When specifying a pathspec including a branch/commit, path separator
> characters are not translated. Since tab-completion in windows shells (ex:
> CMD, PowerShell, not unix-style shells running on windows) uses the windows
> path separator, and other git commands work fine with the windows path
> separator, the expected behavior would be to translate for me.
>
> Reproduction:
> git diff BRANCH:path\to\file path\to\file
>
> Result:
> fatal: Path 'path\to\file' does not exist in 'BRANCH'
>
> Expected:
> Normal diff operation
>
> Workaround:
> Manually convert pathspec. Examples of working command:
> git diff BRANCH:path/to/file path\to\otherfile
> git diff BRANCH:path/to/file path/to/otherfile
That's not a bug, it is expected behavior. "BRANCH:path/to/file" is not
"file on disk" syntax, but Git's syntax to reference a particular object
in the database. For this reason, forward-slashes are mandated; there is
no option to use backslashes in this case.
Backslashes could actually be part of directory and file names in the
database. It would be impossible to check out a tree with such names on
Windows, obviously.
-- Hannes
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-11-20 22:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-20 21:09 Bug: Pathspec parsing on Windows fails when branch specified Eris Belew
2013-11-20 22:12 ` Johannes Sixt
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 NNTP newsgroup(s).