mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-11-23 22:24:51 +02:00
smarter refreshing for tags and remotes
This commit is contained in:
@@ -61,7 +61,7 @@ func (gui *Gui) refreshSidePanels(options refreshOptions) error {
|
||||
scopeMap = intArrToMap(options.scope)
|
||||
}
|
||||
|
||||
if scopeMap[COMMITS] || scopeMap[BRANCHES] || scopeMap[REFLOG] || scopeMap[TAGS] || scopeMap[REMOTES] {
|
||||
if scopeMap[COMMITS] || scopeMap[BRANCHES] || scopeMap[REFLOG] {
|
||||
wg.Add(1)
|
||||
func() {
|
||||
if options.mode == ASYNC {
|
||||
@@ -97,8 +97,34 @@ func (gui *Gui) refreshSidePanels(options refreshOptions) error {
|
||||
}()
|
||||
}
|
||||
|
||||
if scopeMap[TAGS] {
|
||||
wg.Add(1)
|
||||
func() {
|
||||
if options.mode == ASYNC {
|
||||
go gui.refreshTags()
|
||||
} else {
|
||||
gui.refreshTags()
|
||||
}
|
||||
wg.Done()
|
||||
}()
|
||||
}
|
||||
|
||||
if scopeMap[REMOTES] {
|
||||
wg.Add(1)
|
||||
func() {
|
||||
if options.mode == ASYNC {
|
||||
go gui.refreshRemotes()
|
||||
} else {
|
||||
gui.refreshRemotes()
|
||||
}
|
||||
wg.Done()
|
||||
}()
|
||||
}
|
||||
|
||||
wg.Wait()
|
||||
|
||||
gui.refreshStatus()
|
||||
|
||||
if options.then != nil {
|
||||
options.then()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user