From 0687c07f50d7af4dce51f76a8f1eb38eb7ee1d1a Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Wed, 15 Aug 2018 09:45:24 +1000 Subject: [PATCH] more robust reading of reflog to get branch name --- pkg/git/branch_list_builder.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/git/branch_list_builder.go b/pkg/git/branch_list_builder.go index e4a8461b8..869e05c98 100644 --- a/pkg/git/branch_list_builder.go +++ b/pkg/git/branch_list_builder.go @@ -144,7 +144,7 @@ func branchInfoFromLine(line string) (string, string, string) { r := regexp.MustCompile("\\|.*\\s") line = r.ReplaceAllString(line, " ") words := strings.Split(line, " ") - return words[0], words[1], words[3] + return words[0], words[1], words[len(words)-1] } func abbreviatedTimeUnit(timeUnit string) string {