mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-27 23:08:02 +02:00
Factor out redundant statement
This commit is contained in:
parent
b9b2f58bc8
commit
69718fb557
@ -228,26 +228,25 @@ func (app *App) setupRepo() (bool, error) {
|
|||||||
return false, err
|
return false, err
|
||||||
}
|
}
|
||||||
|
|
||||||
if isBare {
|
fmt.Print(app.Tr.BareRepo)
|
||||||
fmt.Print(app.Tr.BareRepo)
|
|
||||||
response, _ := bufio.NewReader(os.Stdin).ReadString('\n')
|
|
||||||
shouldOpenRecent := strings.Trim(response, " \r\n") == "y"
|
|
||||||
|
|
||||||
if shouldOpenRecent {
|
response, _ := bufio.NewReader(os.Stdin).ReadString('\n')
|
||||||
for _, repoDir := range app.Config.GetAppState().RecentRepos {
|
shouldOpenRecent := strings.Trim(response, " \r\n") == "y"
|
||||||
if isRepo, _ := isDirectoryAGitRepository(repoDir); isRepo {
|
|
||||||
if err := os.Chdir(repoDir); err == nil {
|
if shouldOpenRecent {
|
||||||
return true, nil
|
for _, repoDir := range app.Config.GetAppState().RecentRepos {
|
||||||
}
|
if isRepo, _ := isDirectoryAGitRepository(repoDir); isRepo {
|
||||||
|
if err := os.Chdir(repoDir); err == nil {
|
||||||
|
return true, nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Println(app.Tr.NoRecentRepositories)
|
|
||||||
os.Exit(1)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
os.Exit(0)
|
fmt.Println(app.Tr.NoRecentRepositories)
|
||||||
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
os.Exit(0)
|
||||||
}
|
}
|
||||||
|
|
||||||
return false, nil
|
return false, nil
|
||||||
|
Loading…
x
Reference in New Issue
Block a user