Skip to content

Commit

Permalink
refresh commits when adding a tag
Browse files Browse the repository at this point in the history
  • Loading branch information
jesseduffield committed Feb 24, 2020
1 parent fdb543f commit 8ad01fe
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions pkg/gui/tags_panel.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,13 @@ func (gui *Gui) handleDeleteTag(g *gocui.Gui, v *gocui.View) error {
if err := gui.GitCommand.DeleteTag(tag.Name); err != nil {
return gui.createErrorPanel(gui.g, err.Error())
}
return gui.refreshTags()
if err := gui.refreshCommits(g); err != nil {
return gui.createErrorPanel(g, err.Error())
}
if err := gui.refreshTags(); err != nil {
return gui.createErrorPanel(g, err.Error())
}
return nil
}, nil)
}

Expand Down Expand Up @@ -137,7 +143,13 @@ func (gui *Gui) handleCreateTag(g *gocui.Gui, v *gocui.View) error {
if err := gui.GitCommand.CreateLightweightTag(v.Buffer(), ""); err != nil {
return gui.createErrorPanel(gui.g, err.Error())
}
return gui.refreshTags()
if err := gui.refreshCommits(g); err != nil {
return gui.createErrorPanel(g, err.Error())
}
if err := gui.refreshTags(); err != nil {
return gui.createErrorPanel(g, err.Error())
}
return nil
})
}

Expand Down

0 comments on commit 8ad01fe

Please sign in to comment.