mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-08-08 22:36:49 +02:00
Remove unused field gui.IsNewRepo
This commit is contained in:
@ -108,8 +108,6 @@ type Gui struct {
|
|||||||
|
|
||||||
PopupHandler types.IPopupHandler
|
PopupHandler types.IPopupHandler
|
||||||
|
|
||||||
IsNewRepo bool
|
|
||||||
|
|
||||||
IsRefreshingFiles bool
|
IsRefreshingFiles bool
|
||||||
|
|
||||||
// we use this to decide whether we'll return to the original directory that
|
// we use this to decide whether we'll return to the original directory that
|
||||||
|
@ -21,8 +21,7 @@ func (gui *Gui) updateRecentRepoList() error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
known, recentRepos := newRecentReposList(recentRepos, currentRepo)
|
recentRepos = newRecentReposList(recentRepos, currentRepo)
|
||||||
gui.IsNewRepo = known
|
|
||||||
// TODO: migrate this file to use forward slashes on all OSes for consistency
|
// TODO: migrate this file to use forward slashes on all OSes for consistency
|
||||||
// (windows uses backslashes at the moment)
|
// (windows uses backslashes at the moment)
|
||||||
gui.c.GetAppState().RecentRepos = recentRepos
|
gui.c.GetAppState().RecentRepos = recentRepos
|
||||||
@ -30,8 +29,7 @@ func (gui *Gui) updateRecentRepoList() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// newRecentReposList returns a new repo list with a new entry but only when it doesn't exist yet
|
// newRecentReposList returns a new repo list with a new entry but only when it doesn't exist yet
|
||||||
func newRecentReposList(recentRepos []string, currentRepo string) (bool, []string) {
|
func newRecentReposList(recentRepos []string, currentRepo string) []string {
|
||||||
isNew := true
|
|
||||||
newRepos := []string{currentRepo}
|
newRepos := []string{currentRepo}
|
||||||
for _, repo := range recentRepos {
|
for _, repo := range recentRepos {
|
||||||
if repo != currentRepo {
|
if repo != currentRepo {
|
||||||
@ -39,9 +37,7 @@ func newRecentReposList(recentRepos []string, currentRepo string) (bool, []strin
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
newRepos = append(newRepos, repo)
|
newRepos = append(newRepos, repo)
|
||||||
} else {
|
|
||||||
isNew = false
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return isNew, newRepos
|
return newRepos
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user