jesseduffield / lazygit

simple terminal UI for git commands
MIT License
53.08k stars 1.85k forks source link

got index out of range error #89

Closed zhaohuaxishi closed 6 years ago

zhaohuaxishi commented 6 years ago

panic: runtime error: index out of range

goroutine 1 [running]: main.branchInfoFromLine(0xc420220000, 0x3e, 0xc4202060e0, 0x6, 0x7, 0x0, 0xc420059988, 0x4ea309) /Users/jesseduffieldduffield/go/src/github.com/jesseduffield/lazygit/gitcommands.go:549 +0x100 main.getBranches(0x540ba7, 0xa, 0xc42021c000) /Users/jesseduffieldduffield/go/src/github.com/jesseduffield/lazygit/gitcommands.go:576 +0x15f main.getGitBranches(0xc42011c000, 0x54046e, 0x8) /Users/jesseduffieldduffield/go/src/github.com/jesseduffield/lazygit/gitcommands.go:610 +0x159 main.refreshBranches.func1(0xc42011c000, 0x1, 0xc420059bf0) /Users/jesseduffieldduffield/go/src/github.com/jesseduffield/lazygit/branches_panel.go:111 +0x97 github.com/jesseduffield/lazygit/vendor/github.com/jesseduffield/gocui.(Gui).consumeevents(0xc42011c000, 0x0, 0x0) /Users/jesseduffieldduffield/go/src/github.com/jesseduffield/lazygit/vendor/github.com/jesseduffield/gocui/gui.go:414 +0x17c github.com/jesseduffield/lazygit/vendor/github.com/jesseduffield/gocui.(Gui).MainLoop(0xc42011c000, 0x0, 0x0) /Users/jesseduffieldduffield/go/src/github.com/jesseduffield/lazygit/vendor/github.com/jesseduffield/gocui/gui.go:396 +0x1f5 main.run(0x0, 0x0) /Users/jesseduffieldduffield/go/src/github.com/jesseduffield/lazygit/gui.go:231 +0x130 main.main() /Users/jesseduffieldduffield/go/src/github.com/jesseduffield/lazygit/main.go:99 +0x108

jesseduffield commented 6 years ago

To assist in debugging, could you do a git status and post the output?

zhaohuaxishi commented 6 years ago

On branch feature/sidebar Your branch is up to date with 'origin/feature/sidebar'.

Changes to be committed: (use "git reset HEAD ..." to unstage)

modified:   src/CMakeLists.txt
new file:   src/sideslipbar/rpc/mh_sdk_app_executor_base.cpp
new file:   src/sideslipbar/rpc/mh_sdk_app_executor_base.h
modified:   src/sideslipbar/sidebar_event.cpp
Swenson1992 commented 6 years ago

same question with me~~

jesseduffield commented 6 years ago

@zhaohuaxishi This should be resolved in https://github.com/jesseduffield/lazygit/pull/146

The original issue was caused by unicode characters not being processed correctly

There is currently a PR up https://github.com/jesseduffield/lazygit/pull/137 for doing i18n, feel free to contribute to that effort if you want to get involved in any translations :)

Please pull down the latest release and see if this solves your issue

zhaohuaxishi commented 6 years ago

it works, thank you for help.