Closed DennisBecker closed 5 years ago
Thanks for the bug report @DennisBecker, I will re-implement from scratch to handle stash. Current implementation is messy and does not cover such cases like yours.
In your case; a stash item in a repository breaks the stash parsing function.
I hope this bug will be solved in the next release. If you can find the repository which causes app to crash, can you provide me the output of git stash list
command? Maybe I can come up with a qucik patch. Thanks in advance.
Looks like one repository contains the following on the stash:
stash@{0}: autostash
I guess this could happen from my git pull --rebase --autostash
command I'm using.
I did a quick patch, if you can install with go get -u github.com/isacikgoz/gitbatch
it should solve the issue for now.
Since there is no additional feedback, I am closing this issue and mark it as resolved with #74. Thanks for the feedback again @DennisBecker
I'm getting this on version 0.5.0
|panic: runtime error: slice bounds out of range │
│ │
goroutine 10 [running]: │
github.com/isacikgoz/gitbatch/core/git.(*Repository).loadStashedItems(0xc000240270, 0xc000132070, 0x0) │
│ /Users/ibrahim/git/gitbatch/core/git/stash.go:51 +0x7a8 │
github.com/isacikgoz/gitbatch/core/git.(*Repository).loadComponents(0xc000240270, 0x1, 0xc000240270, 0x0) │
│ /Users/ibrahim/git/gitbatch/core/git/repository.go:155 +0xa2 │
github.com/isacikgoz/gitbatch/core/git.InitializeRepo(0xc000023200, 0x28, 0xc0000aad20, 0x1, 0x0) │
│ /Users/ibrahim/git/gitbatch/core/git/repository.go:137 +0x7d │
github.com/isacikgoz/gitbatch/core/load.AsyncLoad.func1(0xc00000e7a0, 0xc000027560, 0xc0001aa020, 0xc000023200, 0x28) │
│ /Users/ibrahim/git/gitbatch/core/load/load.go:79 +0x89 │
created by github.com/isacikgoz/gitbatch/core/load.AsyncLoad │
│ /Users/ibrahim/git/gitbatch/core/load/load.go:76 +0x18e
I have installed v0.4.1 on my Mac OS 10.14.2 notebook and opened gitbatch within the directory I have all git repositories cloned. The following output happens after a while:
The current go version is: