summaryrefslogtreecommitdiffstats
path: root/pkg/commands/git.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/commands/git.go')
-rw-r--r--pkg/commands/git.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/pkg/commands/git.go b/pkg/commands/git.go
index fe0600065..3464215c7 100644
--- a/pkg/commands/git.go
+++ b/pkg/commands/git.go
@@ -157,7 +157,9 @@ func findDotGitDir(stat func(string) (os.FileInfo, error), readFile func(filenam
// GetStashEntries stash entries
func (c *GitCommand) GetStashEntries() []*StashEntry {
- rawString, _ := c.OSCommand.RunCommandWithOutput("git stash list --pretty='%gs'")
+ // if we directly put this string in RunCommandWithOutput the compiler complains because it thinks it's a format string
+ unescaped := "git stash list --pretty='%gs'"
+ rawString, _ := c.OSCommand.RunCommandWithOutput(unescaped)
stashEntries := []*StashEntry{}
for i, line := range utils.SplitLines(rawString) {
stashEntries = append(stashEntries, stashEntryFromLine(line, i))