1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-11-25 04:43:08 +03:00
This commit is contained in:
Jesse Duffield
2021-12-07 21:59:36 +11:00
parent 157dd309f7
commit b4c078d565
48 changed files with 437 additions and 493 deletions

View File

@@ -10,8 +10,7 @@ import (
)
func (c *GitCommand) getUnfilteredStashEntries() []*models.StashEntry {
unescaped := "git stash list --pretty='%gs'"
rawString, _ := c.OSCommand.RunCommandWithOutput(unescaped)
rawString, _ := c.RunWithOutput(c.NewCmdObj("git stash list --pretty='%gs'"))
stashEntries := []*models.StashEntry{}
for i, line := range utils.SplitLines(rawString) {
stashEntries = append(stashEntries, stashEntryFromLine(line, i))
@@ -25,7 +24,7 @@ func (c *GitCommand) GetStashEntries(filterPath string) []*models.StashEntry {
return c.getUnfilteredStashEntries()
}
rawString, err := c.RunCommandWithOutput("git stash list --name-only")
rawString, err := c.RunWithOutput(c.NewCmdObj("git stash list --name-only"))
if err != nil {
return c.getUnfilteredStashEntries()
}