Description
I was not able to find an open or closed issue matching what I'm seeing
Setup
- Which version of Git for Windows are you using? Is it 32-bit or 64-bit?
$ git --version --build-options
git version 2.25.0.windows.1
cpu: x86_64
built from commit: 7c71c859c97853ed057da5cbab12f3c13b5554df
sizeof-long: 4
sizeof-size_t: 8
- 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.17763.914]
- What options did you set as part of the installation? Or did you choose the
defaults?
$ cat /etc/install-options.txt
Editor Option: CustomEditor
Custom Editor Path: "c:\Program Files (x86)\Geany\bin\Geany.exe" -i
Path Option: Cmd
SSH Option: OpenSSH
Tortoise Option: false
CURL Option: WinSSL
CRLF Option: LFOnly
Bash Terminal Option: MinTTY
Performance Tweaks FSCache: Enabled
Use Credential Manager: Enabled
Enable Symlinks: Disabled
- Any other interesting things about your environment that might be related
to the issue you're seeing?
I think I remember seeing something about a (possibly experimental) C re-implementation of git add
, which is what I suspect is responsible for this. I’m pretty sure I enabled the option, but I don’t see anything related in the install options above.
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.
> gitk &
> git add -p
- What did you expect to occur after running these commands?
Assuming there are any changes in the repository, i.e. that git add
doesn’t exit immediately, I would expect to be able to use the gitk
to look at the repository history, including the contents of existing commits, the contents of the index, and any local changes that are not yet checked into the index.
Note that this used to work until recently (around December 2019). I’ve been using it a lot; for example, when picking changes it’s often useful to look at more context than just git add -p
provides, or to run git blame
on a line (via the right-click menu in gitk
).
- What actually happened instead?
While git add -p
is still running (i.e., displaying a prompt and waiting for a user decision), gitk
does not display any commit content other than what was initially selected.
If you click on a commit (or the special index/local changes entries), it shows the metadata (parent, hash, author, description), but it does not show the commit changes/tree. (The areas where these would be shown are just blank.) If you stop git add
, the content of the selected commit appears in gitk
a moment later.
I imagine what happens is that the git add
command is holding some sort of lock while waiting for user input that it didn’t use to hold a couple months ago. I’m not sure if the correct fix is for gitk
to ignore that lock, or for git add
to stop holding it.
- If the problem was occurring with a specific repository, can you provide the
URL to that repository to help us with testing?
As far as I’m aware, it happens in any repository.