Closed nandryshak closed 5 years ago
will look at this
I fixed it with the pr #40 , please let me know if you have still issues. Thanks for the feedback
still getting an error with version 0.2.0: @isacikgoz
panic: runtime error: slice bounds out of range
goroutine 41 [running]:
github.com/isacikgoz/gitbatch/pkg/git.(*RepoEntity).loadStashedItems(0xc00033c200, 0x0, 0x0)
/Users/ibrahim/go/src/github.com/isacikgoz/gitbatch/pkg/git/cmd-stash.go:65 +0x684
github.com/isacikgoz/gitbatch/pkg/git.(*RepoEntity).loadComponents(0xc00033c200, 0x1, 0xc00033c200, 0x0)
/Users/ibrahim/go/src/github.com/isacikgoz/gitbatch/pkg/git/repository.go:119 +0x92
github.com/isacikgoz/gitbatch/pkg/git.InitializeRepo(0xc000180d60, 0x1c, 0xc000234070, 0x0, 0x0)
/Users/ibrahim/go/src/github.com/isacikgoz/gitbatch/pkg/git/repository.go:104 +0x7d
github.com/isacikgoz/gitbatch/pkg/git.LoadRepositoryEntities.func1(0xc000234070, 0xc000234080, 0xc00023c020, 0xc000180d60, 0x1c)
/Users/ibrahim/go/src/github.com/isacikgoz/gitbatch/pkg/git/util-load.go:27 +0x7d
created by github.com/isacikgoz/gitbatch/pkg/git.LoadRepositoryEntities
/Users/ibrahim/go/src/github.com/isacikgoz/gitbatch/pkg/git/util-load.go:23 +0x158
hey @amityo i'm looking into this right now. hope pr #45 will solve the issue.
Sorry to tell you, but still the same on 0.2.1:
panic: runtime error: slice bounds out of range
goroutine 25 [running]:
github.com/isacikgoz/gitbatch/pkg/git.(*RepoEntity).loadStashedItems(0xc420183200, 0x0, 0x0)
/home/someone/workspace/gocode/src/github.com/isacikgoz/gitbatch/pkg/git/cmd-stash.go:71 +0x70f
github.com/isacikgoz/gitbatch/pkg/git.(*RepoEntity).loadComponents(0xc420183200, 0x1, 0xc420183200, 0x0)
/home/someone/workspace/gocode/src/github.com/isacikgoz/gitbatch/pkg/git/repository.go:119 +0x92
github.com/isacikgoz/gitbatch/pkg/git.InitializeRepo(0xc4201ce7c0, 0x34, 0xc4201f5d60, 0x0, 0x0)
/home/someone/workspace/gocode/src/github.com/isacikgoz/gitbatch/pkg/git/repository.go:104 +0x7d
github.com/isacikgoz/gitbatch/pkg/git.LoadRepositoryEntities.func1(0xc4201f5d60, 0xc4201f5d70, 0xc420202880, 0xc4201ce7c0, 0x34)
/home/someone/workspace/gocode/src/github.com/isacikgoz/gitbatch/pkg/git/util-load.go:27 +0x7d
created by github.com/isacikgoz/gitbatch/pkg/git.LoadRepositoryEntities
/home/someone/workspace/gocode/src/github.com/isacikgoz/gitbatch/pkg/git/util-load.go:23 +0x13f
thanks for checking @tobixx I think, I am constantly failing to reproduce the error. Can you print the output of the git stash list
command in your repository that results this outcome?
I've just patched da697f6a3d7a431e69c326effca9096b4232ec6e you can try it if you can update with
go get -u github.com/isacikgoz/gitbatch
Great! That worked ! Many thanks!
The hotfix in da697f6 also worked for me, thanks!
https://github.com/isacikgoz/gitbatch/blob/e566c4ba671ddb223f36cc78c4a1285cd53d767c/pkg/git/cmd-stash.go#L64
Stashed items don't always have a hash id in the message, so trying to parse it like this will fail. Use
git stash push -m 'no hash here'
to create a stash item with no hash id.