diff options
author | Andrew Hynes <andrew.hynes@colabsoftware.com> | 2022-11-13 11:02:06 -0330 |
---|---|---|
committer | Andrew Hynes <andrew.hynes@colabsoftware.com> | 2022-11-13 11:02:06 -0330 |
commit | 3c436b34576432322ec7eab29d5e9badc4094b26 (patch) | |
tree | 3dadbb2b01d40d827f037cb3927fd485214bb45e /pkg | |
parent | e56b05cbac0328fdbd1df3fa045dbb0829162be2 (diff) |
lint: delete unused argument from `handleStashSave`
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/gui/controllers/files_controller.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/pkg/gui/controllers/files_controller.go b/pkg/gui/controllers/files_controller.go index 50ef448c9..08263ebd2 100644 --- a/pkg/gui/controllers/files_controller.go +++ b/pkg/gui/controllers/files_controller.go @@ -761,7 +761,7 @@ func (self *FilesController) createStashMenu() error { if !self.helpers.WorkingTree.IsWorkingTreeDirty() { return self.c.ErrorMsg(self.c.Tr.NoFilesToStash) } - return self.handleStashSave(self.git.Stash.Save, self.c.Tr.Actions.StashAllChanges, self.c.Tr.NoFilesToStash) + return self.handleStashSave(self.git.Stash.Save, self.c.Tr.Actions.StashAllChanges) }, Key: 'a', }, @@ -772,14 +772,14 @@ func (self *FilesController) createStashMenu() error { return self.c.ErrorMsg(self.c.Tr.NoFilesToStash) } // if there are no staged files it behaves the same as Stash.Save - return self.handleStashSave(self.git.Stash.StashAndKeepIndex, self.c.Tr.Actions.StashAllChangesKeepIndex, self.c.Tr.NoFilesToStash) + return self.handleStashSave(self.git.Stash.StashAndKeepIndex, self.c.Tr.Actions.StashAllChangesKeepIndex) }, Key: 'i', }, { Label: self.c.Tr.LcStashIncludeUntrackedChanges, OnPress: func() error { - return self.handleStashSave(self.git.Stash.StashIncludeUntrackedChanges, self.c.Tr.Actions.StashIncludeUntrackedChanges, self.c.Tr.NoFilesToStash) + return self.handleStashSave(self.git.Stash.StashIncludeUntrackedChanges, self.c.Tr.Actions.StashIncludeUntrackedChanges) }, Key: 'U', }, @@ -790,7 +790,7 @@ func (self *FilesController) createStashMenu() error { if !self.helpers.WorkingTree.AnyStagedFiles() { return self.c.ErrorMsg(self.c.Tr.NoTrackedStagedFilesStash) } - return self.handleStashSave(self.git.Stash.SaveStagedChanges, self.c.Tr.Actions.StashStagedChanges, self.c.Tr.NoTrackedStagedFilesStash) + return self.handleStashSave(self.git.Stash.SaveStagedChanges, self.c.Tr.Actions.StashStagedChanges) }, Key: 's', }, @@ -801,10 +801,10 @@ func (self *FilesController) createStashMenu() error { return self.c.ErrorMsg(self.c.Tr.NoFilesToStash) } if self.helpers.WorkingTree.AnyStagedFiles() { - return self.handleStashSave(self.git.Stash.StashUnstagedChanges, self.c.Tr.Actions.StashUnstagedChanges, self.c.Tr.NoFilesToStash) + return self.handleStashSave(self.git.Stash.StashUnstagedChanges, self.c.Tr.Actions.StashUnstagedChanges) } // ordinary stash - return self.handleStashSave(self.git.Stash.Save, self.c.Tr.Actions.StashUnstagedChanges, self.c.Tr.NoFilesToStash) + return self.handleStashSave(self.git.Stash.Save, self.c.Tr.Actions.StashUnstagedChanges) }, Key: 'u', }, @@ -813,7 +813,7 @@ func (self *FilesController) createStashMenu() error { } func (self *FilesController) stash() error { - return self.handleStashSave(self.git.Stash.Save, self.c.Tr.Actions.StashAllChanges, self.c.Tr.NoTrackedStagedFilesStash) + return self.handleStashSave(self.git.Stash.Save, self.c.Tr.Actions.StashAllChanges) } func (self *FilesController) createResetToUpstreamMenu() error { @@ -841,7 +841,7 @@ func (self *FilesController) toggleTreeView() error { return self.c.PostRefreshUpdate(self.context()) } -func (self *FilesController) handleStashSave(stashFunc func(message string) error, action string, errorMsg string) error { +func (self *FilesController) handleStashSave(stashFunc func(message string) error, action string) error { return self.c.Prompt(types.PromptOpts{ Title: self.c.Tr.StashChanges, |