Closed
Description
Setup
- Which version of Git for Windows are you using? Is it 32-bit or 64-bit?
$ git --version --build-options
git version 2.17.1.windows.2
cpu: x86_64
built from commit: a60968cf435951d9411fc0f980a2e362d5cccea2
sizeof-long: 4
- Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
$ cmd.exe /c ver
Microsoft Windows [Version 10.0.17134.48]
- What options did you set as part of the installation? Or did you choose the
defaults?
$ cat /etc/install-options.txt
Editor Option: VIM
Path Option: Cmd
SSH Option: OpenSSH
CURL Option: OpenSSL
CRLF Option: CRLFAlways
Bash Terminal Option: MinTTY
Performance Tweaks FSCache: Enabled
Use Credential Manager: Enabled
Enable Symlinks: Disabled
Details
- Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other
Bash
- What commands did you run to trigger this issue? If you can provide a
Minimal, Complete, and Verifiable example
this will help us understand the issue.
$ MY_TMP="$(mktemp -d)"
$ echo $MY_TMP
/tmp/tmp.GVpowzwlaC
$ git checkout-index --prefix="$MY_TMP/" -f -- "test.cpp"
- What did you expect to occur after running these commands?
The file test.cpp being checked out into /tmp/tmp.GVpowzwlaC/test.cpp
- What actually happened instead?
The file test.cpp being checked out into /tmp/tmp.GVpowzwlaCtest.cpp
Not sure if I do something wrong or if maybe POSIX-to-Windows path conversion discards a trailing backslash? The issue appeared after I upgraded from v2.16.0(2). Note that printing the variable seems to work as expected.
$ echo $MY_TMP/
/tmp/tmp.GVpowzwlaC/