mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-17 01:42:45 +02:00
fix crash on first open
This commit is contained in:
@ -515,15 +515,6 @@ func (gui *Gui) Run() error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
if !gui.Config.GetUserConfig().DisableStartupPopups {
|
|
||||||
popupTasks := []func(chan struct{}) error{}
|
|
||||||
storedPopupVersion := gui.Config.GetAppState().StartupPopupVersion
|
|
||||||
if storedPopupVersion < StartupPopupVersion {
|
|
||||||
popupTasks = append(popupTasks, gui.showIntroPopupMessage)
|
|
||||||
}
|
|
||||||
gui.showInitialPopups(popupTasks)
|
|
||||||
}
|
|
||||||
|
|
||||||
gui.waitForIntro.Add(1)
|
gui.waitForIntro.Add(1)
|
||||||
if gui.Config.GetUserConfig().Git.AutoFetch {
|
if gui.Config.GetUserConfig().Git.AutoFetch {
|
||||||
go utils.Safe(gui.startBackgroundFetch)
|
go utils.Safe(gui.startBackgroundFetch)
|
||||||
|
@ -375,6 +375,15 @@ func (gui *Gui) onInitialViewsCreation() error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if !gui.Config.GetUserConfig().DisableStartupPopups {
|
||||||
|
popupTasks := []func(chan struct{}) error{}
|
||||||
|
storedPopupVersion := gui.Config.GetAppState().StartupPopupVersion
|
||||||
|
if storedPopupVersion < StartupPopupVersion {
|
||||||
|
popupTasks = append(popupTasks, gui.showIntroPopupMessage)
|
||||||
|
}
|
||||||
|
gui.showInitialPopups(popupTasks)
|
||||||
|
}
|
||||||
|
|
||||||
if gui.showRecentRepos {
|
if gui.showRecentRepos {
|
||||||
if err := gui.handleCreateRecentReposMenu(); err != nil {
|
if err := gui.handleCreateRecentReposMenu(); err != nil {
|
||||||
return err
|
return err
|
||||||
|
0
test/integration/initialOpen/config/config.yml
Normal file
0
test/integration/initialOpen/config/config.yml
Normal file
@ -0,0 +1 @@
|
|||||||
|
asd
|
1
test/integration/initialOpen/expected/.git_keep/HEAD
Normal file
1
test/integration/initialOpen/expected/.git_keep/HEAD
Normal file
@ -0,0 +1 @@
|
|||||||
|
ref: refs/heads/master
|
10
test/integration/initialOpen/expected/.git_keep/config
Normal file
10
test/integration/initialOpen/expected/.git_keep/config
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
[core]
|
||||||
|
repositoryformatversion = 0
|
||||||
|
filemode = true
|
||||||
|
bare = false
|
||||||
|
logallrefupdates = true
|
||||||
|
ignorecase = true
|
||||||
|
precomposeunicode = true
|
||||||
|
[user]
|
||||||
|
email = CI@example.com
|
||||||
|
name = CI
|
@ -0,0 +1 @@
|
|||||||
|
Unnamed repository; edit this file 'description' to name the repository.
|
BIN
test/integration/initialOpen/expected/.git_keep/index
Normal file
BIN
test/integration/initialOpen/expected/.git_keep/index
Normal file
Binary file not shown.
@ -0,0 +1,7 @@
|
|||||||
|
# git ls-files --others --exclude-from=.git/info/exclude
|
||||||
|
# Lines that start with '#' are comments.
|
||||||
|
# For a project mostly in C, the following would be a good set of
|
||||||
|
# exclude patterns (uncomment them if you want to use them):
|
||||||
|
# *.[oa]
|
||||||
|
# *~
|
||||||
|
.DS_Store
|
@ -0,0 +1,2 @@
|
|||||||
|
0000000000000000000000000000000000000000 46f86259c48ec60496e43d9c962e32f40e7cdefb CI <CI@example.com> 1617799345 +1000 commit (initial): myfile1
|
||||||
|
46f86259c48ec60496e43d9c962e32f40e7cdefb e4776798a2a73374b45e6321b60b5578b9fb590c CI <CI@example.com> 1617799348 +1000 commit: asd
|
@ -0,0 +1,2 @@
|
|||||||
|
0000000000000000000000000000000000000000 46f86259c48ec60496e43d9c962e32f40e7cdefb CI <CI@example.com> 1617799345 +1000 commit (initial): myfile1
|
||||||
|
46f86259c48ec60496e43d9c962e32f40e7cdefb e4776798a2a73374b45e6321b60b5578b9fb590c CI <CI@example.com> 1617799348 +1000 commit: asd
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,2 @@
|
|||||||
|
x��M
|
||||||
|
1@a�=E���i�6 "��c�'E�q����w����-^]��1�8�M�2z�����SHH�7�\�v-T�5o���'� ��VV�M�0��N��6���ϸ/��M�|�������S]��u�b�������>5�On����q8�
|
@ -0,0 +1 @@
|
|||||||
|
e4776798a2a73374b45e6321b60b5578b9fb590c
|
1
test/integration/initialOpen/expected/myfile1
Normal file
1
test/integration/initialOpen/expected/myfile1
Normal file
@ -0,0 +1 @@
|
|||||||
|
test1
|
1
test/integration/initialOpen/expected/myfile2
Normal file
1
test/integration/initialOpen/expected/myfile2
Normal file
@ -0,0 +1 @@
|
|||||||
|
test1
|
1
test/integration/initialOpen/recording.json
Normal file
1
test/integration/initialOpen/recording.json
Normal file
@ -0,0 +1 @@
|
|||||||
|
{"KeyEvents":[{"Timestamp":891,"Mod":0,"Key":27,"Ch":0},{"Timestamp":1344,"Mod":0,"Key":256,"Ch":32},{"Timestamp":1639,"Mod":0,"Key":256,"Ch":99},{"Timestamp":2128,"Mod":0,"Key":256,"Ch":97},{"Timestamp":2176,"Mod":0,"Key":256,"Ch":115},{"Timestamp":2280,"Mod":0,"Key":256,"Ch":100},{"Timestamp":2592,"Mod":0,"Key":13,"Ch":13},{"Timestamp":2960,"Mod":0,"Key":256,"Ch":113}],"ResizeEvents":[{"Timestamp":0,"Width":272,"Height":74}]}
|
14
test/integration/initialOpen/setup.sh
Normal file
14
test/integration/initialOpen/setup.sh
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
cd $1
|
||||||
|
|
||||||
|
git init
|
||||||
|
|
||||||
|
git config user.email "CI@example.com"
|
||||||
|
git config user.name "CI"
|
||||||
|
|
||||||
|
echo test1 > myfile1
|
||||||
|
git add .
|
||||||
|
git commit -am "myfile1"
|
||||||
|
|
||||||
|
echo test1 > myfile2
|
1
test/integration/initialOpen/test.json
Normal file
1
test/integration/initialOpen/test.json
Normal file
@ -0,0 +1 @@
|
|||||||
|
{ "description": "testing the initial popup appears when first starting lazygit", "speed": 15 }
|
Reference in New Issue
Block a user