diff options
-rw-r--r-- | pkg/commands/git.go | 6 | ||||
-rw-r--r-- | pkg/gui/files_panel.go | 19 | ||||
-rw-r--r-- | pkg/gui/keybindings.go | 6 | ||||
-rw-r--r-- | pkg/i18n/dutch.go | 3 | ||||
-rw-r--r-- | pkg/i18n/english.go | 3 | ||||
-rw-r--r-- | pkg/i18n/polish.go | 3 |
6 files changed, 0 insertions, 40 deletions
diff --git a/pkg/commands/git.go b/pkg/commands/git.go index e306efe13..bd834e574 100644 --- a/pkg/commands/git.go +++ b/pkg/commands/git.go @@ -508,12 +508,6 @@ func (c *GitCommand) Checkout(branch string, force bool) error { return c.OSCommand.RunCommand(fmt.Sprintf("git checkout %s %s", forceArg, branch)) } -// AddPatch prepares a subprocess for adding a patch by patch -// this will eventually be swapped out for a better solution inside the Gui -func (c *GitCommand) AddPatch(filename string) *exec.Cmd { - return c.OSCommand.PrepareSubProcess("git", "add", "--patch", c.OSCommand.Quote(filename)) -} - // PrepareCommitSubProcess prepares a subprocess for `git commit` func (c *GitCommand) PrepareCommitSubProcess() *exec.Cmd { return c.OSCommand.PrepareSubProcess("git", "commit") diff --git a/pkg/gui/files_panel.go b/pkg/gui/files_panel.go index 4329632a7..f73d84cdb 100644 --- a/pkg/gui/files_panel.go +++ b/pkg/gui/files_panel.go @@ -264,25 +264,6 @@ func (gui *Gui) handleStageAll(g *gocui.Gui, v *gocui.View) error { return gui.handleFileSelect(g, v, false) } -func (gui *Gui) handleAddPatch(g *gocui.Gui, v *gocui.View) error { - file, err := gui.getSelectedFile(g) - if err != nil { - if err == gui.Errors.ErrNoFiles { - return nil - } - return err - } - if !file.HasUnstagedChanges { - return gui.createErrorPanel(g, gui.Tr.SLocalize("FileHasNoUnstagedChanges")) - } - if !file.Tracked { - return gui.createErrorPanel(g, gui.Tr.SLocalize("CannotGitAdd")) - } - - gui.SubProcess = gui.GitCommand.AddPatch(file.Name) - return gui.Errors.ErrSubProcess -} - func (gui *Gui) handleIgnoreFile(g *gocui.Gui, v *gocui.View) error { file, err := gui.getSelectedFile(g) if err != nil { diff --git a/pkg/gui/keybindings.go b/pkg/gui/keybindings.go index fadf0c0c6..4bd28c74c 100644 --- a/pkg/gui/keybindings.go +++ b/pkg/gui/keybindings.go @@ -255,12 +255,6 @@ func (gui *Gui) GetInitialKeybindings() []*Binding { Description: gui.Tr.SLocalize("toggleStagedAll"), }, { ViewName: "files", - Key: 't', - Modifier: gocui.ModNone, - Handler: gui.handleAddPatch, - Description: gui.Tr.SLocalize("addPatch"), - }, { - ViewName: "files", Key: 'D', Modifier: gocui.ModNone, Handler: gui.handleCreateResetMenu, diff --git a/pkg/i18n/dutch.go b/pkg/i18n/dutch.go index bd3f77a09..43b36a8f0 100644 --- a/pkg/i18n/dutch.go +++ b/pkg/i18n/dutch.go @@ -110,9 +110,6 @@ func addDutch(i18nObject *i18n.Bundle) error { ID: "pull", Other: "pull", }, &i18n.Message{ - ID: "addPatch", - Other: "bewerkingen toevoegen", - }, &i18n.Message{ ID: "edit", Other: "bewerken", }, &i18n.Message{ diff --git a/pkg/i18n/english.go b/pkg/i18n/english.go index cf60bcb1a..856fd7d85 100644 --- a/pkg/i18n/english.go +++ b/pkg/i18n/english.go @@ -133,9 +133,6 @@ func addEnglish(i18nObject *i18n.Bundle) error { ID: "pull", Other: "pull", }, &i18n.Message{ - ID: "addPatch", - Other: "add patch", - }, &i18n.Message{ ID: "edit", Other: "edit", }, &i18n.Message{ diff --git a/pkg/i18n/polish.go b/pkg/i18n/polish.go index 0c90d7c2c..21c1f2231 100644 --- a/pkg/i18n/polish.go +++ b/pkg/i18n/polish.go @@ -102,9 +102,6 @@ func addPolish(i18nObject *i18n.Bundle) error { ID: "refresh", Other: "odśwież", }, &i18n.Message{ - ID: "addPatch", - Other: "dodaj łatkę", - }, &i18n.Message{ ID: "edit", Other: "edytuj", }, &i18n.Message{ |