1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-08-06 11:02:41 +03:00

add test for StashDo and refactor StashDo method

This commit is contained in:
Anthony HAMON
2018-08-28 20:18:34 +02:00
committed by Anthony HAMON
parent 85012dbc8f
commit 99840d8fc4
2 changed files with 13 additions and 1 deletions

View File

@@ -106,7 +106,7 @@ func (c *GitCommand) GetStatusFiles() []File {
// StashDo modify stash
func (c *GitCommand) StashDo(index int, method string) error {
return c.OSCommand.RunCommand("git stash " + method + " stash@{" + fmt.Sprint(index) + "}")
return c.OSCommand.RunCommand(fmt.Sprintf("git stash %s stash@{%d}", method, index))
}
// StashSave save stash