diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2018-08-15 09:45:24 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2018-08-15 09:45:24 +1000 |
commit | 0687c07f50d7af4dce51f76a8f1eb38eb7ee1d1a (patch) | |
tree | 10326ea473fa778ad131c914d4b8184c322a989b /pkg/git | |
parent | 922f4ed5a42123af0e4b74030273429f9fbaa43a (diff) |
more robust reading of reflog to get branch name
Diffstat (limited to 'pkg/git')
-rw-r--r-- | pkg/git/branch_list_builder.go | 2 |
1 files changed, 1 insertions, 1 deletions
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 { |