diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2019-02-18 21:29:43 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2019-02-18 21:29:43 +1100 |
commit | 76a27f417fc7fd24b4fdf12f0aeeb94ecca958d3 (patch) | |
tree | 2c75a15e6facb18b1f5ff1831cf67d5664b796dd /pkg/gui/commits_panel.go | |
parent | adc252901944e84433cb8a50de9b114ba120282d (diff) |
rename any commit
Diffstat (limited to 'pkg/gui/commits_panel.go')
-rw-r--r-- | pkg/gui/commits_panel.go | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/pkg/gui/commits_panel.go b/pkg/gui/commits_panel.go index e791cf87b..4bf0d4362 100644 --- a/pkg/gui/commits_panel.go +++ b/pkg/gui/commits_panel.go @@ -181,14 +181,17 @@ func (gui *Gui) handleRenameCommit(g *gocui.Gui, v *gocui.View) error { } func (gui *Gui) handleRenameCommitEditor(g *gocui.Gui, v *gocui.View) error { - if gui.State.Panels.Commits.SelectedLine != 0 { - return gui.createErrorPanel(g, gui.Tr.SLocalize("OnlyRenameTopCommit")) + subProcess, err := gui.GitCommand.InteractiveRebase(gui.State.Commits, gui.State.Panels.Commits.SelectedLine, "reword") + if err != nil { + return err } - - gui.SubProcess = gui.GitCommand.PrepareCommitAmendSubProcess() - g.Update(func(g *gocui.Gui) error { + if subProcess != nil { + gui.SubProcess = subProcess + // g.Update(func(g *gocui.Gui) error { + // return gui.Errors.ErrSubProcess + // }) return gui.Errors.ErrSubProcess - }) + } return nil } |