summaryrefslogtreecommitdiffstats
path: root/pkg/commands/branch_list_builder.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/commands/branch_list_builder.go')
-rw-r--r--pkg/commands/branch_list_builder.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/pkg/commands/branch_list_builder.go b/pkg/commands/branch_list_builder.go
index d7a232055..e5af76853 100644
--- a/pkg/commands/branch_list_builder.go
+++ b/pkg/commands/branch_list_builder.go
@@ -47,7 +47,9 @@ func (b *BranchListBuilder) obtainCurrentBranch() *Branch {
func (b *BranchListBuilder) obtainReflogBranches() []*Branch {
branches := make([]*Branch, 0)
- rawString, err := b.GitCommand.OSCommand.RunCommandWithOutput("git reflog -n100 --pretty='%cr|%gs' --grep-reflog='checkout: moving' HEAD")
+ // if we directly put this string in RunCommandWithOutput the compiler complains because it thinks it's a format string
+ unescaped := "git reflog -n100 --pretty='%cr|%gs' --grep-reflog='checkout: moving' HEAD"
+ rawString, err := b.GitCommand.OSCommand.RunCommandWithOutput(unescaped)
if err != nil {
return branches
}