Re: [PATCH 00/13] git-p4: python3 compatibility
- From
Ben Keene <seraphire@gmail.com>
- Date
- Dec 10, 2019, 14:20 UTC
- Message-ID
- <caa4b235-8ec8-0b6f-49e5-3c95e3a5f5e3@gmail.com>
- In-Reply-To
- <nycvar.QRO.7.76.6.1912092043470.31080@tvgsbejvaqbjf.bet>
On 12/9/2019 2:48 PM, Johannes Schindelin wrote:
Show 9 quoted lines
> Hi Ben, > > On Mon, 9 Dec 2019, Ben Keene wrote: > >> So, I just attempted to run a base case on windows: git p4 clone //depot and >> I'm getting an error: >> >> Depot paths must start with "//": /depot > You started this in a Bash, right?
No, I started it from a windows command cmd.exe prompt. (I almost never use the bash prompt)
Show 12 quoted lines
> > The Git Bash has the very specific problem that many of Git's shell > scripts assume that forward slashes are directory separators, not > backslashes, and that absolute paths start with a single forward slash. In > other words, they expect Unix paths. > > But we're on Windows! So the MSYS2 runtime (which is the POSIX emulation > layer derived from Cygwin which allows us to build and run Bash on > Windows) "translates" between the paths. For example, if you pass `/depot` > as a parameter to a Git command, the MSYS2 runtime notices that `git.exe` > is not an MSYS2 program (i.e. it does not understand pseudo-Unix paths), > and translates the path to `C:/Program Files/Git/depot`.
That is good to know!
Show 5 quoted lines
> > However, your call has _two_ slashes, right? That is unfortunately MSYS2's > trick to say "oh BTW keep the slash, this is not a Unix path". > > To avoid this, just set `MSYS_NO_PATHCONV`, like so:
When I first installed git, I didn't read the release notes. (Shame on me!) and I installed python for windows and added an alias for git-p4.py against the windows version of python, so when I run git, it's not performing that conversion.
Show 7 quoted lines
> MSYS_NO_PATHCONV=1 git p4 clone //depot > > This behavior is documented in our release notes, by the way: > https://github.com/git-for-windows/build-extra/blob/master/ReleaseNotes.md#known-issues > > Ciao, > Johannes
I'm starting to run out of time at work, so I'll be slow to try and repro this.
Thanks for the info!
- Ben