-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Description
Describe the bug
When tag.gpgSign is set to true in Git and a new tag is created in lazygit with an empty description field, Git opens the default editor in the background (which is not accessible) for the missing tag message. Lazygit then waits for it to exit, which never happens. This leaves Lazygit in a state where it is still somewhat usable but very sluggish, for example, keyboard inputs art missing. You have to kill the editor manually.
To Reproduce
Steps to reproduce the behavior:
- Set tag.gpgSign to true in your git configuration
git config tag.gpgSign true. - Open lazygit.
- Create a new tag and leave the description field empty.
- Observe that lazygit hangs ('creating tag' in status bar), waiting for the hidden editor to close.
Expected behavior
Lazygit should handle the tag creation gracefully, either by enforcing a tag message or by handling the case where the description field is empty without hanging.
Version info:
lazygit: commit=5e388e21c8ca6aa883dbcbe45c47f6fdd5116815, build date=2023-08-07T14:05:48Z, build source=binaryRelease, version=0.40.2, os=windows, arch=amd64, git version=2.42.0.windows.1
git: git version 2.42.0.windows.1
Additional context
This issue appears to be specific to the combination of using tag.gpgSign and leaving the tag description field empty in lazygit.
I assume the default behavior is to create a lightweight tag when the description field is empty. I think Lazygit should consider the tag.gpgSign setting and give a hint when the description field is empty and tag.gpgSign is set to true.
Debug log
Aug 23 11:17:25 |INFO| postRefreshUpdate for localBranches took 37.3841ms
Aug 23 11:17:25 |DEBU| using cache for key rebase.updateRefs
Aug 23 11:17:25 |INFO| git merge-base HEAD HEAD@{u} (98.1522ms)
Aug 23 11:17:25 |INFO| git merge-base HEAD refs/remotes/origin/main (109.8915ms)
Aug 23 11:17:25 |INFO| git log HEAD --topo-order --oneline --pretty=format:%H%x00%at%x00%aN%x00%ae%x00%D%x00%p%x00%s --abbrev=40 -300 --no-show-signature -- (118.1127ms)
Aug 23 11:17:25 |DEBU| RunCommand command="git rev-parse --abbrev-ref --verify HEAD"
Aug 23 11:17:25 |INFO| git rev-parse --abbrev-ref --verify HEAD (93.1223ms)
Aug 23 11:17:25 |DEBU| using cache for key rebase.updateRefs
Aug 23 11:17:25 |INFO| postRefreshUpdate for commits took 1.0923ms
Aug 23 11:17:26 |DEBU| RunCommand command="git log --graph --color=always --abbrev-commit --decorate --date=relative --pretty=medium refs/tags/v1.2.10 --"
Aug 23 11:17:34 |INFO| refreshing the following scopes in sync mode: files
Aug 23 11:17:34 |INFO| refreshed merge conflicts in 0s
Aug 23 11:17:34 |DEBU| using cache for key status.showUntrackedFiles
Aug 23 11:17:34 |DEBU| RunCommand command="git status --untracked-files=all --porcelain -z"
Aug 23 11:17:34 |INFO| git status --untracked-files=all --porcelain -z (99.7917ms)
Aug 23 11:17:34 |INFO| refreshed files in 124.4685ms
Aug 23 11:17:34 |INFO| Refresh took 124.4685ms
Aug 23 11:17:34 |INFO| postRefreshUpdate for submodules took 0s
Aug 23 11:17:34 |INFO| postRefreshUpdate for files took 0s
Aug 23 11:17:43 |DEBU| RunCommand command="git log --graph --color=always --abbrev-commit --decorate --date=relative --pretty=medium refs/tags/v1.2.10 --"
Aug 23 11:17:43 |DEBU| RunCommand command="git show-ref --tags --quiet --verify -- refs/tags/v1.2.11"
Aug 23 11:17:43 |ERRO| <no msg> command="git show-ref --tags --quiet --verify -- refs/tags/v1.2.11"
Aug 23 11:17:43 |INFO| git show-ref --tags --quiet --verify -- refs/tags/v1.2.11 (97.0819ms)
Aug 23 11:17:43 |DEBU| RunCommand command="git tag -- v1.2.11"
Aug 23 11:17:44 |INFO| refreshing the following scopes in sync mode: files
Aug 23 11:17:44 |DEBU| using cache for key status.showUntrackedFiles
Aug 23 11:17:44 |INFO| refreshed merge conflicts in 0s
Aug 23 11:17:44 |DEBU| RunCommand command="git status --untracked-files=all --porcelain -z"
Aug 23 11:17:44 |INFO| git status --untracked-files=all --porcelain -z (86.0057ms)
Aug 23 11:17:44 |INFO| refreshed files in 107.8382ms
Aug 23 11:17:44 |INFO| Refresh took 108.857ms
Aug 23 11:17:44 |INFO| postRefreshUpdate for submodules took 0s
Aug 23 11:17:44 |INFO| postRefreshUpdate for files took 0s
Aug 23 11:17:54 |INFO| refreshing the following scopes in sync mode: files
Aug 23 11:17:54 |DEBU| using cache for key status.showUntrackedFiles
Aug 23 11:17:54 |INFO| refreshed merge conflicts in 0s
Aug 23 11:17:54 |DEBU| RunCommand command="git status --untracked-files=all --porcelain -z"
Aug 23 11:17:54 |INFO| git status --untracked-files=all --porcelain -z (83.144ms)
Aug 23 11:17:54 |INFO| refreshed files in 105.862ms
Aug 23 11:17:54 |INFO| Refresh took 105.862ms
Aug 23 11:17:54 |INFO| postRefreshUpdate for submodules took 0s
Aug 23 11:17:54 |INFO| postRefreshUpdate for files took 0s
Aug 23 11:18:04 |INFO| refreshing the following scopes in sync mode: files
Aug 23 11:18:04 |INFO| refreshed merge conflicts in 0s
Aug 23 11:18:04 |DEBU| using cache for key status.showUntrackedFiles
Aug 23 11:18:04 |DEBU| RunCommand command="git status --untracked-files=all --porcelain -z"
Aug 23 11:18:04 |INFO| git status --untracked-files=all --porcelain -z (111.6585ms)
Aug 23 11:18:04 |INFO| refreshed files in 138.4393ms
Aug 23 11:18:04 |INFO| Refresh took 139.0411ms
Aug 23 11:18:04 |INFO| postRefreshUpdate for submodules took 0s
Aug 23 11:18:04 |INFO| postRefreshUpdate for files took 0s
Aug 23 11:18:06 |INFO| postRefreshUpdate for stash took 0s
Aug 23 11:18:06 |INFO| postRefreshUpdate for localBranches took 512.6µs
Aug 23 11:18:06 |INFO| postRefreshUpdate for worktrees took 0s
Aug 23 11:18:06 |INFO| git merge-base HEAD refs/remotes/origin/main (271.6646ms)
Aug 23 11:18:06 |INFO| git -c log.showSignature=false log -g --abbrev=40 --format=%h%x00%ct%x00%gs%x00%p (275.5594ms)
Aug 23 11:18:06 |INFO| postRefreshUpdate for reflogCommits took 2.1835ms
Aug 23 11:18:06 |INFO| git log HEAD --topo-order --oneline --pretty=format:%H%x00%at%x00%aN%x00%ae%x00%D%x00%p%x00%s --abbrev=40 -300 --no-show-signature -- (278.8783ms)
Aug 23 11:18:06 |INFO| git status --untracked-files=all --porcelain -z (300.8983ms)
Aug 23 11:18:06 |INFO| postRefreshUpdate for submodules took 0s
Aug 23 11:18:06 |INFO| postRefreshUpdate for files took 54.7µs
Aug 23 11:18:06 |INFO| postRefreshUpdate for submodules took 0s
Aug 23 11:18:06 |INFO| postRefreshUpdate for files took 54.7µs
Aug 23 11:18:07 |DEBU| RunCommand command="git for-each-ref --sort=-committerdate --format=%(HEAD)%00%(refname:short)%00%(upstream:short)%00%(upstream:track)%00%(subject)%00%(objectname) refs/heads"
Aug 23 11:18:07 |DEBU| RunCommand command="git rev-parse --abbrev-ref --verify HEAD"
Aug 23 11:18:07 |INFO| git for-each-ref --sort=-committerdate --format=%(HEAD)%00%(refname:short)%00%(upstream:short)%00%(upstream:track)%00%(subject)%00%(objectname) refs/heads (98.1454ms)
Aug 23 11:18:07 |INFO| postRefreshUpdate for localBranches took 511.2µs
Aug 23 11:18:07 |DEBU| using cache for key rebase.updateRefs
Aug 23 11:18:07 |INFO| git rev-parse --abbrev-ref --verify HEAD (96.7818ms)
Aug 23 11:18:07 |DEBU| using cache for key rebase.updateRefs
Aug 23 11:18:07 |INFO| postRefreshUpdate for commits took 1.1807ms
Aug 23 11:18:11 |DEBU| RunCommand command="git log --graph --color=always --abbrev-commit --decorate --date=relative --pretty=medium refs/tags/v1.2.10 --"
Aug 23 11:18:14 |INFO| refreshing the following scopes in sync mode: files
Aug 23 11:18:14 |INFO| refreshed merge conflicts in 0s
Aug 23 11:18:14 |DEBU| using cache for key status.showUntrackedFiles
Aug 23 11:18:14 |DEBU| RunCommand command="git status --untracked-files=all --porcelain -z"