mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-08-07 22:02:56 +03:00
fix crash on first open
This commit is contained in:
@@ -515,15 +515,6 @@ func (gui *Gui) Run() error {
|
||||
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)
|
||||
if gui.Config.GetUserConfig().Git.AutoFetch {
|
||||
go utils.Safe(gui.startBackgroundFetch)
|
||||
|
@@ -375,6 +375,15 @@ func (gui *Gui) onInitialViewsCreation() error {
|
||||
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 err := gui.handleCreateRecentReposMenu(); err != nil {
|
||||
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<01><>M
|
||||
1@a<>=E<><45><EFBFBD>i<EFBFBD>6 "<22><>c<EFBFBD>'E<>q<EFBFBD><71><EFBFBD><EFBFBD>w<EFBFBD><77><EFBFBD><EFBFBD>-^]<5D><>1<EFBFBD>8<>M<EFBFBD>2z<><7A><EFBFBD><EFBFBD><EFBFBD>SHH<11>7<EFBFBD>\<5C>v-T<0B>5o<35><1A><>'<27> <20><>VV<>M<EFBFBD>0<EFBFBD><30>N<EFBFBD><4E>6<EFBFBD><36><EFBFBD>ϸ/<2F><>M<EFBFBD>|<7C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>S]<5D><>u<EFBFBD>b<14><><EFBFBD><EFBFBD><01><><EFBFBD>>5<>On<4F><6E><EFBFBD><1F>q8<71>
|
@@ -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