diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-09-28 09:14:32 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-09-29 18:21:59 +1000 |
commit | b8da166ab1c66671d681bc2454b911993716de58 (patch) | |
tree | 6c85b73b530d2771c901024dbd1cc762ccbfa208 /pkg/gui/files_panel.go | |
parent | ca437a65046d5af0c90c337b125af4538e625502 (diff) |
support discarding submodule changes
Diffstat (limited to 'pkg/gui/files_panel.go')
-rw-r--r-- | pkg/gui/files_panel.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/pkg/gui/files_panel.go b/pkg/gui/files_panel.go index aa01b4b36..c57f94082 100644 --- a/pkg/gui/files_panel.go +++ b/pkg/gui/files_panel.go @@ -93,6 +93,9 @@ func (gui *Gui) refreshFiles() error { // if the filesView hasn't been instantiated yet we just return return nil } + if err := gui.refreshStateSubmoduleConfigs(); err != nil { + return err + } if err := gui.refreshStateFiles(); err != nil { return err } @@ -426,6 +429,17 @@ func (gui *Gui) refreshStateFiles() error { return nil } +func (gui *Gui) refreshStateSubmoduleConfigs() error { + configs, err := gui.GitCommand.GetSubmoduleConfigs() + if err != nil { + return err + } + + gui.State.SubmoduleConfigs = configs + + return nil +} + func (gui *Gui) handlePullFiles(g *gocui.Gui, v *gocui.View) error { if gui.popupPanelFocused() { return nil |