Skip to content

Commit 5cb80b8

Browse files
committed
Fix command log for stash commands
With the exception of Rename Stash, they would all just log "Stash".
1 parent ee81a8e commit 5cb80b8

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

pkg/gui/controllers/stash_controller.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ func (self *StashController) handleStashApply(stashEntry *models.StashEntry) err
112112
Title: self.c.Tr.StashApply,
113113
Prompt: self.c.Tr.SureApplyStashEntry,
114114
HandleConfirm: func() error {
115-
self.c.LogAction(self.c.Tr.Actions.Stash)
115+
self.c.LogAction(self.c.Tr.Actions.ApplyStash)
116116
err := self.c.Git().Stash.Apply(stashEntry.Index)
117117
self.postStashRefresh()
118118
if err != nil {
@@ -128,7 +128,7 @@ func (self *StashController) handleStashApply(stashEntry *models.StashEntry) err
128128

129129
func (self *StashController) handleStashPop(stashEntry *models.StashEntry) error {
130130
pop := func() error {
131-
self.c.LogAction(self.c.Tr.Actions.Stash)
131+
self.c.LogAction(self.c.Tr.Actions.PopStash)
132132
err := self.c.Git().Stash.Pop(stashEntry.Index)
133133
self.postStashRefresh()
134134
if err != nil {
@@ -160,7 +160,7 @@ func (self *StashController) handleStashDrop(stashEntries []*models.StashEntry)
160160
Title: self.c.Tr.StashDrop,
161161
Prompt: self.c.Tr.SureDropStashEntry,
162162
HandleConfirm: func() error {
163-
self.c.LogAction(self.c.Tr.Actions.Stash)
163+
self.c.LogAction(self.c.Tr.Actions.DropStash)
164164
for i := len(stashEntries) - 1; i >= 0; i-- {
165165
err := self.c.Git().Stash.Drop(stashEntries[i].Index)
166166
self.c.Refresh(types.RefreshOptions{Scope: []types.RefreshableView{types.STASH}})

pkg/i18n/english.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,6 +1011,9 @@ type Actions struct {
10111011
UpdateRemote string
10121012
ApplyPatch string
10131013
Stash string
1014+
PopStash string
1015+
ApplyStash string
1016+
DropStash string
10141017
RenameStash string
10151018
RemoveSubmodule string
10161019
ResetSubmodule string
@@ -2050,6 +2053,9 @@ func EnglishTranslationSet() *TranslationSet {
20502053
UpdateRemote: "Update remote",
20512054
ApplyPatch: "Apply patch",
20522055
Stash: "Stash",
2056+
PopStash: "Pop stash",
2057+
ApplyStash: "Apply stash",
2058+
DropStash: "Drop stash",
20532059
RenameStash: "Rename stash",
20542060
RemoveSubmodule: "Remove submodule",
20552061
ResetSubmodule: "Reset submodule",

0 commit comments

Comments
 (0)