jesseduffield / lazygit

simple terminal UI for git commands
MIT License
53.65k stars 1.87k forks source link

Welcome message not dissapearing after first open #4052

Open BenceBakos opened 2 weeks ago

BenceBakos commented 2 weeks ago

Describe the bug "Thanks for using lazygit! Seriously you rock. Three things to share with you:" message appearing every time I open lazygit. Shouldn't it dissapear after the first time?

To Reproduce Open lazygit

Expected behavior Welcome box should dissapear after 2. time opening lazygit.

Screenshots image

Version info: commit=611fabde11d24d9acc71ee26077b9a1101f59f27, build date=2024-09-18T10:56:10Z, build source=binaryRelease, version=0.44.1, os=linux, arch=amd64, git version=2.43.0 git version 2.43.0

Additional context I'm using ubuntu, installed based on docs: https://github.com/jesseduffield/lazygit?tab=readme-ov-file#ubuntu

mark2185 commented 2 weeks ago

Could you check if there's a state.yml file in the folder that running lazygit -cd prints?

It should have entries like lastversion and startuppopupversion which should prevent this popup.

BenceBakos commented 2 weeks ago

@mark2185 just an empty config.yml:

$ cd /home/b/.config/lazygit
$ ls
config.yml
$ cat config.yml 
$ ls -la
total 8
drwxr-xr-x  2 b b 4096 Nov  8 21:28 .
drwx------ 19 b b 4096 Nov  8 21:28 ..
-rw-rw-r--  1 b b    0 Nov  8 21:28 config.yml
BenceBakos commented 2 weeks ago

lazygit --debug gives following output:


Nov  9 07:22:52 |DEBU| using cache for key rebase.updateRefs 
Nov  9 07:22:52 |INFO| git status --untracked-files=all --porcelain -z --find-renames=50% (1.649612ms) 
Nov  9 07:22:52 |INFO| postRefreshUpdate for commits took 1.731761ms 
Nov  9 07:22:52 |DEBU| using cache for key rebase.updateRefs 
Nov  9 07:22:52 |DEBU| RunCommand command="git for-each-ref --sort=-committerdate --format=%(HEAD)%00%(refname:shor
t)%00%(upstream:short)%00%(upstream:track)%00%(push:track)%00%(subject)%00%(objectname)%00%(committerdate:unix) ref
s/heads"
Nov  9 07:22:52 |INFO| postRefreshUpdate for submodules took 15.759µs 
Nov  9 07:22:52 |INFO| postRefreshUpdate for files took 83.543µs 
Nov  9 07:22:52 |INFO| git for-each-ref --sort=-committerdate --format=%(HEAD)%00%(refname:short)%00%(upstream:shor
t)%00%(upstream:track)%00%(push:track)%00%(subject)%00%(objectname)%00%(committerdate:unix) refs/heads (2.274076ms)

Nov  9 07:22:52 |INFO| postRefreshUpdate for localBranches took 57.642µs 
Nov  9 07:22:52 |DEBU| using cache for key rebase.updateRefs 
Nov  9 07:23:13 |DEBU| RunCommand command="git --version"
Nov  9 07:23:13 |INFO| git --version (1.29581ms) 
Nov  9 07:23:13 |DEBU| RunCommand command="git -C /home/b/.config/nvim rev-parse --path-format=absolute --show-topl
evel --absolute-git-dir --git-common-dir --is-bare-repository --show-superproject-working-tree"
Nov  9 07:23:13 |INFO| git -C /home/b/.config/nvim rev-parse --path-format=absolute --show-toplevel --absolute-git-
dir --git-common-dir --is-bare-repository --show-superproject-working-tree (2.113876ms) 
Nov  9 07:23:13 |DEBU| RunCommand command="git -C /home/b/.config/nvim rev-parse --path-format=absolute --show-topl
evel --absolute-git-dir --git-common-dir --is-bare-repository --show-superproject-working-tree"
Nov  9 07:23:13 |INFO| git -C /home/b/.config/nvim rev-parse --path-format=absolute --show-toplevel --absolute-git-
dir --git-common-dir --is-bare-repository --show-superproject-working-tree (2.319441ms) 
Nov  9 07:23:13 |INFO| starting main loop 
Nov  9 07:23:13 |INFO| Binary is not built with the buildBinary flag so we won't check for an update 
Nov  9 07:23:13 |INFO| refreshing all scopes in async mode 
Nov  9 07:23:13 |INFO| Refresh took 91.977µs 
Nov  9 07:23:13 |DEBU| RunCommand command="git rev-parse --abbrev-ref --verify HEAD"
Nov  9 07:23:13 |DEBU| RunCommand command="git tag --list -n --sort=-creatordate"
Nov  9 07:23:13 |DEBU| RunCommand command="git stash list -z --pretty=%ct|%gs"
Nov  9 07:23:13 |INFO| git for-each-ref --sort=refname --format=%(refname:short) refs/remotes (1.928495ms) 
Nov  9 07:23:13 |DEBU| RunCommand command="git for-each-ref --sort=-committerdate --format=%(HEAD)%00%(refname:shor
t)%00%(upstream:short)%00%(upstream:track)%00%(push:track)%00%(subject)%00%(objectname)%00%(committerdate:unix) ref
s/heads"
Nov  9 07:23:13 |DEBU| Error getting git config value for key: rebase.updateRefs. Error: the key is not found for [
git config --get --null rebase.updateRefs] 
Nov  9 07:23:13 |INFO| git stash list -z --pretty=%ct|%gs (2.943369ms) 
Nov  9 07:23:13 |INFO| postRefreshUpdate for stash took 19.326µs 
Nov  9 07:23:13 |INFO| git rev-parse --abbrev-ref --verify HEAD (4.189541ms) 
Nov  9 07:23:13 |DEBU| RunCommand command="git merge-base main main@{u}"
Nov  9 07:23:13 |INFO| postRefreshUpdate for remotes took 2.073134ms 
Nov  9 07:23:13 |INFO| postRefreshUpdate for remoteBranches took 6.062µs 
Nov  9 07:23:13 |INFO| git for-each-ref --sort=-committerdate --format=%(HEAD)%00%(refname:short)%00%(upstream:shor
t)%00%(upstream:track)%00%(push:track)%00%(subject)%00%(objectname)%00%(committerdate:unix) refs/heads (2.438661ms)

Nov  9 07:23:13 |DEBU| RunCommand command="git worktree list --porcelain"
Nov  9 07:23:13 |INFO| git -c log.showSignature=false log -g --abbrev=40 --format=%h%x00%ct%x00%gs%x00%p (5.073953m
s) 
Nov  9 07:23:13 |INFO| git merge-base main main@{u} (1.851082ms) 
Nov  9 07:23:13 |INFO| postRefreshUpdate for reflogCommits took 118.484µs 
Nov  9 07:23:13 |DEBU| Error getting git config value for key: status.showUntrackedFiles. Error: the key is not fou
nd for [git config --get --null status.showUntrackedFiles] 
Nov  9 07:23:13 |DEBU| RunCommand command="git status --untracked-files=all --porcelain -z --find-renames=50%"
Nov  9 07:23:13 |DEBU| RunCommand command="git rev-parse --symbolic-full-name main@{u}"
Nov  9 07:23:13 |INFO| git worktree list --porcelain (1.698362ms) 
Nov  9 07:23:13 |DEBU| RunCommand command="git -C /home/b/.config/nvim rev-parse --path-format=absolute --absolute-
git-dir"
Nov  9 07:23:13 |INFO| git tag --list -n --sort=-creatordate (2.377524ms) 
Nov  9 07:23:13 |INFO| postRefreshUpdate for tags took 8.648µs 
Nov  9 07:23:13 |DEBU| RunCommand command="git rev-parse --symbolic-full-name master@{u}"
Nov  9 07:23:13 |INFO| git status --untracked-files=all --porcelain -z --find-renames=50% (2.414397ms) 
Nov  9 07:23:13 |INFO| git -C /home/b/.config/nvim rev-parse --path-format=absolute --absolute-git-dir (2.555973ms)

Nov  9 07:23:13 |INFO| git rev-parse --symbolic-full-name main@{u} (3.033315ms) 
Nov  9 07:23:13 |INFO| postRefreshUpdate for worktrees took 429.18µs 
Nov  9 07:23:13 |INFO| postRefreshUpdate for localBranches took 58.429µs 
Nov  9 07:23:13 |ERRO| fatal: no such branch: 'master'
 command="git rev-parse --symbolic-full-name master@{u}"
Nov  9 07:23:13 |INFO| git rev-parse --symbolic-full-name master@{u} (1.931421ms) 
Nov  9 07:23:13 |DEBU| RunCommand command="git rev-parse --verify --quiet refs/remotes/origin/master"
Nov  9 07:23:13 |INFO| git log HEAD --topo-order --oneline --pretty=format:%H%x00%at%x00%aN%x00%ae%x00%D%x00%p%x00%
m%x00%s --abbrev=40 -300 --no-show-signature -- (4.532946ms) 
Nov  9 07:23:13 |INFO| git rev-parse --verify --quiet refs/remotes/origin/master (1.883367ms) 
Nov  9 07:23:13 |DEBU| RunCommand command="git merge-base HEAD refs/remotes/origin/master refs/remotes/origin/main"
Nov  9 07:23:13 |INFO| postRefreshUpdate for submodules took 7.168µs 
Nov  9 07:23:13 |INFO| postRefreshUpdate for files took 58.598µs 
Nov  9 07:23:13 |INFO| git merge-base HEAD refs/remotes/origin/master refs/remotes/origin/main (1.870081ms) 
Nov  9 07:23:13 |DEBU| using cache for key rebase.updateRefs 
Nov  9 07:23:13 |INFO| postRefreshUpdate for commits took 1.176933ms 
Nov  9 07:23:13 |DEBU| using cache for key rebase.updateRefs 
Nov  9 07:23:13 |DEBU| RunCommand command="git for-each-ref --sort=-committerdate --format=%(HEAD)%00%(refname:shor
t)%00%(upstream:short)%00%(upstream:track)%00%(push:track)%00%(subject)%00%(objectname)%00%(committerdate:unix) ref
s/heads"
Nov  9 07:23:13 |INFO| git for-each-ref --sort=-committerdate --format=%(HEAD)%00%(refname:short)%00%(upstream:shor
t)%00%(upstream:track)%00%(push:track)%00%(subject)%00%(objectname)%00%(committerdate:unix) refs/heads (1.498089ms)

Nov  9 07:23:13 |INFO| postRefreshUpdate for localBranches took 48.559µs 
Nov  9 07:23:13 |DEBU| using cache for key rebase.updateRefs 
Nov  9 07:23:23 |INFO| Heap memory in use: 3.9 MB 
N

Actions I did:

  1. open lazygit
  2. press "1" to hide welcome message
Luigi31415 commented 2 weeks ago

it looks like using any valid keybinding does not change the state.yml file

I tried 1-5 for navigation through panes and q for quitting lazygit

both didnt change the state.yml

BenceBakos commented 1 week ago

I've created ~/.config/lazygit/state.yml manually, and it got written:

lastupdatecheck: 0
recentrepos:
    - /home/b/Documents/canyon
startuppopupversion: 0
lastversion: 0.44.1
customcommandshistory: []
hidecommandlog: false
ignorewhitespaceindiffview: false
diffcontextsize: 3
renamesimilaritythreshold: 50
localbranchsortorder: recency
remotebranchsortorder: alphabetical
gitlogorder: topo-order
gitlogshowgraph: always

but the message still appears when I openlazygit

image