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 9c56c78dc..e557ba529 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.RunCommand("git stash %s stash@{%d}", method, index)
+ return c.Run(c.NewCmdObj(fmt.Sprintf("git stash %s stash@{%d}", method, index)))
}
// StashSave save stash
// TODO: before calling this, check if there is anything to save
func (c *GitCommand) StashSave(message string) error {
- return c.RunCommand("git stash save %s", c.OSCommand.Quote(message))
+ return c.Run(c.NewCmdObj("git stash save " + c.OSCommand.Quote(message)))
}
// 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.RunCommand("git stash --keep-index"); err != nil {
+ if err := c.Run(c.NewCmdObj("git stash --keep-index")); err != nil {
return err
}
@@ -30,7 +30,7 @@ func (c *GitCommand) StashSaveStagedChanges(message string) error {
return err
}
- if err := c.RunCommand("git stash apply stash@{1}"); err != nil {
+ if err := c.Run(c.NewCmdObj("git stash apply stash@{1}")); err != nil {
return err
}
@@ -38,7 +38,7 @@ func (c *GitCommand) StashSaveStagedChanges(message string) error {
return err
}
- if err := c.RunCommand("git stash drop stash@{1}"); err != nil {
+ if err := c.Run(c.NewCmdObj("git stash drop stash@{1}")); err != nil {
return err
}