Can quit git diff after the first page #5378

Closed
opened 2026-01-31 00:11:59 +00:00 by claunia · 17 comments
Owner

Originally created by @metin on GitHub (Dec 4, 2019).

It gets stuck when hitting q in the middle of a git diff operation. It is fine if I quit in the first page. It is also fine if I keep paginating until end of the diff.

Environment

Windows build number: Microsoft Windows [Version 10.0.18362.476]
Windows Terminal version (if applicable):   0.7.3291.0


Any other software?
Git for windows: git version 2.24.0.windows.2

Steps to reproduce

  1. cd to any git repository that has as much changes as it could cause pagination.
  2. type git diff and you should see something like this. at this stage you could quit by typing q

image

  1. Hit space to go to next page
  2. Hit q and it will get stuck and never quit
    image

Expected behavior

It shoul always quit from diff even I am in the middle.

Actual behavior

It gets stuck if I hit q in the middle of diff

Originally created by @metin on GitHub (Dec 4, 2019). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> <!-- This bug tracker is monitored by Windows Terminal development team and other technical folks. **Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue. If this is an application crash, please also provide a Feedback Hub submission link so we can find your diagnostic data on the backend. Use the category "Apps > Windows Terminal (Preview)" and choose "Share My Feedback" after submission to get the link. Please use this form and describe your issue, concisely but precisely, with as much detail as possible. --> It gets stuck when hitting `q` in the middle of a `git diff` operation. It is fine if I quit in the first page. It is also fine if I keep paginating until end of the diff. # Environment ```none Windows build number: Microsoft Windows [Version 10.0.18362.476] Windows Terminal version (if applicable): 0.7.3291.0 Any other software? Git for windows: git version 2.24.0.windows.2 ``` # Steps to reproduce <!-- A description of how to trigger this bug. --> 1. `cd` to any git repository that has as much changes as it could cause pagination. 2. type `git diff` and you should see something like this. at this stage you could quit by typing `q` ![image](https://user-images.githubusercontent.com/28767/70231765-079f2b00-176c-11ea-9633-103b1e30dd94.png) 3. Hit space to go to next page 4. Hit `q` and it will get stuck and never quit ![image](https://user-images.githubusercontent.com/28767/70231693-df173100-176b-11ea-87a7-0629c4dad4d2.png) # Expected behavior <!-- A description of what you're expecting, possibly containing screenshots or reference material. --> It shoul always quit from diff even I am in the middle. # Actual behavior It gets stuck if I hit `q` in the middle of diff <!-- What's actually happening? -->
Author
Owner

@DHowett-MSFT commented on GitHub (Dec 4, 2019):

And just to confirm, this does not happen when you're using a standard cmd window?

@DHowett-MSFT commented on GitHub (Dec 4, 2019): And just to confirm, this _does not_ happen when you're using a standard `cmd` window?
Author
Owner

@metin commented on GitHub (Dec 5, 2019):

@DHowett-MSFT correct. standard cmd is just fine

@metin commented on GitHub (Dec 5, 2019): @DHowett-MSFT correct. standard `cmd` is just fine
Author
Owner

@DHowett-MSFT commented on GitHub (Dec 5, 2019):

None of us can reproduce this, which is curious. I've tagged it up with Needs-Repro.

@DHowett-MSFT commented on GitHub (Dec 5, 2019): None of us can reproduce this, which is curious. I've tagged it up with Needs-Repro.
Author
Owner

@metin commented on GitHub (Dec 23, 2019):

Looks like it was related to the version of git. Just upgraded to a newer version and looks like it works
This is the version I am using.

git version 2.24.1.windows.2
@metin commented on GitHub (Dec 23, 2019): Looks like it was related to the version of git. Just upgraded to a newer version and looks like it works This is the version I am using. ``` git version 2.24.1.windows.2 ```
Author
Owner

@DHowett-MSFT commented on GitHub (Dec 23, 2019):

Great, thanks for following up! I’ll close this for now.

@DHowett-MSFT commented on GitHub (Dec 23, 2019): Great, thanks for following up! I’ll close this for now.
Author
Owner

@JohnCgp commented on GitHub (Jul 11, 2022):

I started getting this recently with git version 2.27.0.windows.1, haven't consciously updated. A workaround I've found is Shift+Q, courtesy of this SO answer.

edit: it seems that was just coincidence. The issue is sporadic and must have coincidentally worked when trying upper-case Q. I upgraded to git version 2.37.1.windows.1 and it still happens, both in Terminal and Command Prompt.

@JohnCgp commented on GitHub (Jul 11, 2022): I started getting this recently with `git version 2.27.0.windows.1`, haven't consciously updated. A workaround I've found is <kbd>Shift</kbd>+<kbd>Q</kbd>, courtesy of [this SO answer](https://stackoverflow.com/a/17718995). edit: it seems that was just coincidence. The issue is sporadic and must have coincidentally worked when trying upper-case Q. I upgraded to `git version 2.37.1.windows.1` and it still happens, both in Terminal and Command Prompt.
Author
Owner

@zakeryooo commented on GitHub (Jul 28, 2022):

@JohnCgp did you ever manage to work out what was causing this for you? I don't know of a consistent way to reproduce it but about 30% of the time I can't quit a git diff in terminal.

@zakeryooo commented on GitHub (Jul 28, 2022): @JohnCgp did you ever manage to work out what was causing this for you? I don't know of a consistent way to reproduce it but about 30% of the time I can't quit a git diff in terminal.
Author
Owner

@JohnCgp commented on GitHub (Jul 28, 2022):

No, not yet, and it's very frustrating. If I'm doing a lot of diffing I end up opening gitk after the third tab hangs.

@JohnCgp commented on GitHub (Jul 28, 2022): No, not yet, and it's very frustrating. If I'm doing a lot of diffing I end up opening `gitk` after the third tab hangs.
Author
Owner

@zakeryooo commented on GitHub (Jul 28, 2022):

That's unfortunate. I've had this problem for months, and as you say, it's really frustrating, you can force quit out with CTRL + Pause but then git diff is broken for the rest of the session.

Surprised more people aren't having this issue... it happens on all 3 of my dev machines, even on a fresh Windows install with only git / terminal installed. I ended up resorting to a 3rd party diff/merge tool, I'd prefer to use the default console one but this bug messes with my workflow

@zakeryooo commented on GitHub (Jul 28, 2022): That's unfortunate. I've had this problem for months, and as you say, it's really frustrating, you can force quit out with CTRL + Pause but then git diff is broken for the rest of the session. Surprised more people aren't having this issue... it happens on all 3 of my dev machines, even on a fresh Windows install with only git / terminal installed. I ended up resorting to a 3rd party diff/merge tool, I'd prefer to use the default console one but this bug messes with my workflow
Author
Owner

@zadjii-msft commented on GitHub (Jul 28, 2022):

Last time we saw this, it was related to the git version. I suspect this is a regression upstream, in msys (probably? I don't fully understand the dependency chain from msys->git). Anyone look for issues on their issue tracker?

@zadjii-msft commented on GitHub (Jul 28, 2022): Last time we saw this, it was related to the git version. I suspect this is a regression upstream, in msys (probably? I don't fully understand the dependency chain from msys->git). Anyone look for issues on their issue tracker?
Author
Owner

@JohnCgp commented on GitHub (Jul 29, 2022):

Last time we saw this, it was related to the git version. I suspect this is a regression upstream, in msys

The issue I'm encountering isn't Git related. It started happening to me on Git 2.27.0, which I installed in 2020, from one day to the next. My Git installation is manually managed by myself, but my organization pushes Windows updates to my computer - I suspect it's a regression via Windows update. It happens in Command Prompt, Terminal, and regular PowerShell (5.1).

@JohnCgp commented on GitHub (Jul 29, 2022): > Last time we saw this, it was related to the git version. I suspect this is a regression upstream, in msys The issue I'm encountering isn't Git related. It started happening to me on Git 2.27.0, which I installed in 2020, from one day to the next. My Git installation is manually managed by myself, but my organization pushes Windows updates to my computer - I suspect it's a regression via Windows update. It happens in Command Prompt, Terminal, and regular PowerShell (5.1).
Author
Owner

@bdun commented on GitHub (Oct 1, 2022):

This looks like a new windows 11 issue. This started occurring after a windows update. Windows Version: 10.0.22000.

If I kill the git process in task manager and then try git diff again then this time it locks up from the start as well as all other commands.

git --version
git version 2.36.1.windows.1

Same issue in power shell, and cmd prompt, in both VScode and terminal.

@bdun commented on GitHub (Oct 1, 2022): This looks like a new windows 11 issue. This started occurring after a windows update. Windows Version: 10.0.22000. If I kill the git process in task manager and then try `git diff` again then this time it locks up from the start as well as all other commands. ``` git --version git version 2.36.1.windows.1 ``` Same issue in power shell, and cmd prompt, in both VScode and terminal.
Author
Owner

@saste commented on GitHub (May 7, 2023):

Occurring here as well, after a windows update.

PS> git --version
git version 2.40.1.windows.1

PS> [System.Environment]::OSVersion.Version

Major  Minor  Build  Revision
-----  -----  -----  --------
10     0      19045  0

Previously I was using an older git version, updated with the hope to fix the issue. Also the SHIFT+q workaround does not work (what I do is to kill the tab and create a new one).

What I note, is that the git process hangs, when killing it (for example from the task manager) the control goes back to the terminal. This looks like the q command does not cause the git process to terminate.

@saste commented on GitHub (May 7, 2023): Occurring here as well, after a windows update. ``` PS> git --version git version 2.40.1.windows.1 PS> [System.Environment]::OSVersion.Version Major Minor Build Revision ----- ----- ----- -------- 10 0 19045 0 ``` Previously I was using an older git version, updated with the hope to fix the issue. Also the SHIFT+q workaround does not work (what I do is to kill the tab and create a new one). What I note, is that the git process hangs, when killing it (for example from the task manager) the control goes back to the terminal. This looks like the q command does not cause the git process to terminate.
Author
Owner

@saste commented on GitHub (May 8, 2023):

From this thread:
https://groups.google.com/g/git-for-windows/c/hHzDoeVLHSI

it looks like the issue might be related to third party software interfering with the git/shell communication.

@saste commented on GitHub (May 8, 2023): From this thread: https://groups.google.com/g/git-for-windows/c/hHzDoeVLHSI it looks like the issue might be related to third party software interfering with the git/shell communication.
Author
Owner

@mmdurrant commented on GitHub (Sep 11, 2023):

I just ran into this same thing. I thought I could Ctrl-C the process but it looks like Ctrl-C might be intercepted as a Copy command?

I've been killing the Developer Command Prompt session and just opening another one. It's not "Donald Duck can't sleep cuz the faucet is dripping" annoying but it's annoying enough that I did some Googling and spent time writing this comment hahaha.

@mmdurrant commented on GitHub (Sep 11, 2023): I just ran into this same thing. I thought I could Ctrl-C the process but it looks like Ctrl-C might be intercepted as a Copy command? I've been killing the Developer Command Prompt session and just opening another one. It's not "Donald Duck can't sleep cuz the faucet is dripping" annoying but it's annoying enough that I did some Googling and spent time writing this comment hahaha.
Author
Owner

@alberto-ingenito commented on GitHub (Jul 18, 2024):

Anyone is still experiencing the same problem in Win 11? I am using latest Git version

@alberto-ingenito commented on GitHub (Jul 18, 2024): Anyone is still experiencing the same problem in Win 11? I am using latest Git version
Author
Owner

@JohnCgp commented on GitHub (Dec 6, 2024):

Following up after a couple of years (!) My machine was upgraded to Windows 11 and I haven't encountered this issue since.

From this thread: https://groups.google.com/g/git-for-windows/c/hHzDoeVLHSI

it looks like the issue might be related to third party software interfering with the git/shell communication.

This seems the likely root issue. I suspect the third party security software on my machine has had updates to it which no longer cause the freezing.

@JohnCgp commented on GitHub (Dec 6, 2024): Following up after a couple of years (!) My machine was upgraded to Windows 11 and I haven't encountered this issue since. > From this thread: https://groups.google.com/g/git-for-windows/c/hHzDoeVLHSI > > it looks like the issue might be related to third party software interfering with the git/shell communication. This seems the likely root issue. I suspect the third party security software on my machine has had updates to it which no longer cause the freezing.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#5378