1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-15 01:34:26 +02:00

more robust reading of reflog to get branch name

This commit is contained in:
Jesse Duffield
2018-08-15 09:45:24 +10:00
parent 922f4ed5a4
commit 0687c07f50

View File

@ -144,7 +144,7 @@ func branchInfoFromLine(line string) (string, string, string) {
r := regexp.MustCompile("\\|.*\\s") r := regexp.MustCompile("\\|.*\\s")
line = r.ReplaceAllString(line, " ") line = r.ReplaceAllString(line, " ")
words := strings.Split(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 { func abbreviatedTimeUnit(timeUnit string) string {