diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2022-05-15 20:33:25 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-15 20:33:25 +1000 |
commit | f31dcd3091b2b23562bb10afd7c27b6400e9d39a (patch) | |
tree | c6dabe2a861c9ecf79a502aedfc8c8f0eafbda23 /pkg/commands | |
parent | 8e7f6822fca0ecef541280f31b9507a2ec5e50f6 (diff) | |
parent | 241d182da7d589e4a30520ff8d9ea4143c9e658a (diff) |
Merge pull request #1930 from mark2185/feature/discard-staged-only
Diffstat (limited to 'pkg/commands')
-rw-r--r-- | pkg/commands/git_commands/stash.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pkg/commands/git_commands/stash.go b/pkg/commands/git_commands/stash.go index c479d8610..c0d187a13 100644 --- a/pkg/commands/git_commands/stash.go +++ b/pkg/commands/git_commands/stash.go @@ -25,6 +25,10 @@ func NewStashCommands( } } +func (self *StashCommands) DropNewest() error { + return self.cmd.New("git stash drop").Run() +} + func (self *StashCommands) Drop(index int) error { return self.cmd.New(fmt.Sprintf("git stash drop stash@{%d}", index)).Run() } |