Closed ShadowJonathan closed 2 years ago
Thanks for reporting the issue. Hmmm... I don't know how to reproduce this. From what I can tell from the stack trace, there seems to be a local branch where no commits exist. https://github.com/seachicken/gh-poi/blob/6b42a8af2907b331c4cd3703ba3aab6ee676cb29/poi.go#L311
That is entirely possible, I have branches for which I have stashes, but no commits.
If possible, I still suggest not assuming any branches have divergent commits from any other, it's possible these are merged locally and such, or simply held in place as "todo branches".
The case of creating a local "to do branch" seems to be fine. I have noticed the same error when there is a PR that merges from the default branch (e.g. develop) to another branch (e.g. main).
⠏ Fetching pull requests...panic: runtime error: index out of range [0] with length 0
goroutine 1 [running]:
main.isFullyMerged({0x0, {0xc00019c1fc, 0x4}, {0x122c4a8, 0x0, 0x0}, {0xc0002543c0, 0x1, 0x1}, 0x0}, ...)
/Users/seito/.local/share/gh/extensions/gh-poi/poi.go:312 +0xe5
main.getDeleteStatus({0x0, {0xc00019c1fc, 0x4}, {0x122c4a8, 0x0, 0x0}, {0xc0002543c0, 0x1, 0x1}, 0x0}, ...)
/Users/seito/.local/share/gh/extensions/gh-poi/poi.go:296 +0x158
main.checkDeletion({0xc00024e500, 0xc, 0xa}, {0x0, 0x0})
/Users/seito/.local/share/gh/extensions/gh-poi/poi.go:276 +0x11e
main.GetBranches({0x1145e30, 0x122c4a8}, 0x1)
/Users/seito/.local/share/gh/extensions/gh-poi/poi.go:120 +0x24d
main.runMain(0x1)
/Users/seito/.local/share/gh/extensions/gh-poi/main.go:42 +0x165
main.main()
/Users/seito/.local/share/gh/extensions/gh-poi/main.go:26 +0xbb
I don't know if this will be fixed once I get rid of this case, but I will try to fix this as it is also a problem.
Fixed a problem that is probably related to this.
You can upgrade to the latest version by using gh extension upgrade poi
.
I'll check in a second if that fixes it
Seems to be fixed now, thanks!
Describe the bug
I'm not entirely sure how to fetch more information, please suggest me git commands to run to gain more info.
Your Environment