summaryrefslogtreecommitdiffstats
path: root/pkg/commands/stash_entries.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/commands/stash_entries.go')
-rw-r--r--pkg/commands/stash_entries.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/pkg/commands/stash_entries.go b/pkg/commands/stash_entries.go
index f80b7a858..16b0806bc 100644
--- a/pkg/commands/stash_entries.go
+++ b/pkg/commands/stash_entries.go
@@ -4,13 +4,13 @@ import "fmt"
// StashDo modify stash
func (c *GitCommand) StashDo(index int, method string) error {
- return c.Run(c.NewCmdObj(fmt.Sprintf("git stash %s stash@{%d}", method, index)))
+ return c.Cmd.New(fmt.Sprintf("git stash %s stash@{%d}", method, index)).Run()
}
// StashSave save stash
// TODO: before calling this, check if there is anything to save
func (c *GitCommand) StashSave(message string) error {
- return c.Run(c.NewCmdObj("git stash save " + c.OSCommand.Quote(message)))
+ return c.Cmd.New("git stash save " + c.OSCommand.Quote(message)).Run()
}
// GetStashEntryDiff stash diff
@@ -22,7 +22,7 @@ func (c *GitCommand) ShowStashEntryCmdStr(index int) string {
// shoutouts to Joe on https://stackoverflow.com/questions/14759748/stashing-only-staged-changes-in-git-is-it-possible
func (c *GitCommand) StashSaveStagedChanges(message string) error {
// wrap in 'writing', which uses a mutex
- if err := c.Run(c.NewCmdObj("git stash --keep-index")); err != nil {
+ if err := c.Cmd.New("git stash --keep-index").Run(); err != nil {
return err
}
@@ -30,7 +30,7 @@ func (c *GitCommand) StashSaveStagedChanges(message string) error {
return err
}
- if err := c.Run(c.NewCmdObj("git stash apply stash@{1}")); err != nil {
+ if err := c.Cmd.New("git stash apply stash@{1}").Run(); err != nil {
return err
}
@@ -38,7 +38,7 @@ func (c *GitCommand) StashSaveStagedChanges(message string) error {
return err
}
- if err := c.Run(c.NewCmdObj("git stash drop stash@{1}")); err != nil {
+ if err := c.Cmd.New("git stash drop stash@{1}").Run(); err != nil {
return err
}