Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LazyGit gets stuck when aborting a commit w/ empty message #3891

Open
ghost-in-the-zsh opened this issue Sep 5, 2024 · 0 comments
Open

LazyGit gets stuck when aborting a commit w/ empty message #3891

ghost-in-the-zsh opened this issue Sep 5, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@ghost-in-the-zsh
Copy link

ghost-in-the-zsh commented Sep 5, 2024

Describe the bug

LazyGit (LG) will get stuck when a commit is aborted due to an empty message. Pressing <Enter> or even Ctrl+C in the terminal fails to return back to the LG session.

To Reproduce

  1. In LG, press the keybind to Commit changes using git editor.
  2. Remove text to ensure an empty commit message.
  3. Save and exit from the git editor, which should cause Git to abort the commit.
  4. You will be returned back to the Press enter to return to lazygit prompt.
  5. Get stuck here.

Expected behavior

Expected to actually return back to LG.

Screenshots

Screenshot from 2024-09-05 13-23-01

Note that the ^M and ^C characters in the screenshot are my attempts to return back to LG.

Version info:

LG Version: commit=71ad3fac63a3ef3326021837b49e9497d332818b, build date=2024-07-13T10:24:19Z, build source=binaryRelease, version=0.43.1, os=linux, arch=amd64, git version=2.43.0

Git Version: git version 2.43.0

Additional context

The only way to get out of that LG state was to go into another terminal, find LG's PID, and then kill -SIGTERM <pid>.

In addition, in an attempt to provide logs, I ran lazygit --debug in one terminal and lazygit --logs in another, and while running in debug mode, I was unable to reproduce the error. In this case, it correctly showed that there was an error exit code of 1 and I'm able to go return to the LG session.

Screenshot from 2024-09-05 13-40-03

Lastly, notice that in the normal case, the message Press enter to return to lazygit shows up on the left side of the screen, but on the error case, the message showed up closer to the center of the screen. Not sure if this is or isn't related, but worth mentioning just in case.

Screenshot from 2024-09-05 13-39-47

@ghost-in-the-zsh ghost-in-the-zsh added the bug Something isn't working label Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant