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.0.windows.1.26.g82f1b61609
cpu: x86_64
built from commit: 82f1b6160988ab0a61edebef6ed1c3048b66a3a4
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 6.1.7601]
- What options did you set as part of the installation? Or did you choose the
defaults?
# One of the following:
> type "C:\Program Files\Git\etc\install-options.txt"
> type "C:\Program Files (x86)\Git\etc\install-options.txt"
> type "%USERPROFILE%\AppData\Local\Programs\Git\etc\install-options.txt"
$ cat /etc/install-options.txt
Editor Option: VIM
Path Option: Cmd
SSH Option: OpenSSH
CURL Option: WinSSL
CRLF Option: CRLFAlways
Bash Terminal Option: MinTTY
Performance Tweaks FSCache: Enabled
Use Credential Manager: Enabled
Enable Symlinks: Enabled
Details
- Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other
Git 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.
git init
echo first > foo
git add foo
git commit -m 'Initial commit'
git checkout -b other
echo second > foo
git commit -a -m 'Second'
(
sleep 1
git checkout master
echo 'Press Ctrl-D now'
) &
cat >> foo
git status
- What did you expect to occur after running these commands?
I expect that either checkout will fail, or it will wait until the file is released (with some reasonable timeout), then replace it.
- What actually happened instead?
The file is deleted!
This issue happens all the time when working with Qt Creator, which parses header files constantly, so they're open for short periods. This was reported here. To workaround the issue, Qt Creator avoids using mmap in the clang library, but this did not completely solved the issue, only improved it. This is actually a Git (or MSYS?) bug, which should be solved.
Metadata
Metadata
Assignees
Labels
No labels