summaryrefslogtreecommitdiffstats
path: root/pkg/commands/git_commands/stash.go
diff options
context:
space:
mode:
authorLuka Markušić <luka.markusic@microblink.com>2022-05-08 13:30:43 +0200
committerLuka Markušić <luka.markusic@microblink.com>2022-05-08 14:24:28 +0200
commitca191159f514c016f720751ae05d111d8a9d26dd (patch)
treec606713eedf16155d3c06aeb7496c709ccd813f3 /pkg/commands/git_commands/stash.go
parentf7c44f2407243418a0c4bb8380ede097694644c3 (diff)
Discard staged changes only
Diffstat (limited to 'pkg/commands/git_commands/stash.go')
-rw-r--r--pkg/commands/git_commands/stash.go4
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()
}