Skip to content

Commit a83fc5e

Browse files
committed
Use a better name for the auto-stash for undo
1 parent 2c206c3 commit a83fc5e

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

pkg/gui/controllers/undo_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ func (self *UndoController) hardResetWithAutoStash(commitHash string, options ha
260260
dirtyWorkingTree := self.c.Helpers().WorkingTree.IsWorkingTreeDirty()
261261
if dirtyWorkingTree {
262262
return self.c.WithWaitingStatus(options.WaitingStatus, func(gocui.Task) error {
263-
if err := self.c.Git().Stash.Push(self.c.Tr.StashPrefix + commitHash); err != nil {
263+
if err := self.c.Git().Stash.Push(fmt.Sprintf(self.c.Tr.AutoStashForUndo, utils.ShortHash(commitHash))); err != nil {
264264
return err
265265
}
266266
if err := reset(); err != nil {

pkg/i18n/english.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,7 @@ type TranslationSet struct {
448448
AutoStashTitle string
449449
AutoStashPrompt string
450450
StashPrefix string
451+
AutoStashForUndo string
451452
Discard string
452453
DiscardChangesTitle string
453454
DiscardFileChangesTooltip string
@@ -1541,6 +1542,7 @@ func EnglishTranslationSet() *TranslationSet {
15411542
AutoStashTitle: "Autostash?",
15421543
AutoStashPrompt: "You must stash and pop your changes to bring them across. Do this automatically? (enter/esc)",
15431544
StashPrefix: "Auto-stashing changes for ",
1545+
AutoStashForUndo: "Auto-stashing changes for undoing to %s",
15441546
Discard: "Discard",
15451547
DiscardFileChangesTooltip: "View options for discarding changes to the selected file.",
15461548
DiscardChangesTitle: "Discard changes",

0 commit comments

Comments
 (0)