diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2019-02-20 22:52:17 +1100 |
---|---|---|
committer | Jesse Duffield Duffield <jesseduffieldduffield@Jesses-MacBook-Pro-3.local> | 2019-02-24 09:42:35 +1100 |
commit | 6c1d2d45ef2d001e28ec31095826422ba7461664 (patch) | |
tree | 857cea81552243eb28cd76cb8521f6afc6464c27 /pkg/gui | |
parent | f6b3a9b1842438ece889ce4ef7045365325e53fe (diff) |
some i18n and restricting rewording during interactive rebase
Diffstat (limited to 'pkg/gui')
-rw-r--r-- | pkg/gui/commits_panel.go | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/pkg/gui/commits_panel.go b/pkg/gui/commits_panel.go index 8189079c2..a2f3e858c 100644 --- a/pkg/gui/commits_panel.go +++ b/pkg/gui/commits_panel.go @@ -40,7 +40,7 @@ func (gui *Gui) handleCommitSelect(g *gocui.Gui, v *gocui.View) error { func (gui *Gui) refreshCommits(g *gocui.Gui) error { g.Update(func(*gocui.Gui) error { - builder, err := git.NewCommitListBuilder(gui.Log, gui.GitCommand, gui.OSCommand) + builder, err := git.NewCommitListBuilder(gui.Log, gui.GitCommand, gui.OSCommand, gui.Tr) if err != nil { return err } @@ -212,6 +212,14 @@ func (gui *Gui) handleRenameCommitEditor(g *gocui.Gui, v *gocui.View) error { // commit meaning you are trying to edit the todo file rather than actually // begin a rebase. It then updates the todo file with that action func (gui *Gui) handleMidRebaseCommand(action string) (bool, error) { + // for now we do not support setting 'reword' because it requires an editor + // and that means we either unconditionally wait around for the subprocess to ask for + // our input or we set a lazygit client as the EDITOR env variable and have it + // request us to edit the commit message when prompted. + if action == "reword" { + return true, gui.createErrorPanel(gui.g, gui.Tr.SLocalize("rewordNotSupported")) + } + selectedCommit := gui.State.Commits[gui.State.Panels.Commits.SelectedLine] if selectedCommit.Status != "rebasing" { return false, nil |