git-up / GitUp

The Git interface you've been missing all your life has finally arrived.
http://gitup.co
GNU General Public License v3.0
11.49k stars 1.25k forks source link

`GIT_REPOSITORY_STATE_CHERRYPICK_SEQUENCE` not handled by `GCRepository` `-state` #268

Open capnslipp opened 7 years ago

capnslipp commented 7 years ago

I'm encountering a crash with GitUp (built from source at current master, c07159c9b1 AKA 1.0.7) on macOS 10.11.6 with git 2.11.0 installed.

Crash log: GitUp_2017-01-17-003452_silverdelicious.crash.txt

The issue seems to stem from be being in the middle of a multi-commit cherry-pick (which I occasionally use instead of rebase -i or rebase --onto), at which point GCRepository -state method calls git_repository_state(_private) which returns GIT_REPOSITORY_STATE_CHERRYPICK_SEQUENCE (5), which isn't handled by any of the cases and so it proceeds (“defaults”) to XLOG_DEBUG_UNREACHABLE().

I don't currently have the bandwidth to add a new kGCRepositoryState_CherryPickSequence and get it to work like kGCRepositoryState_CherryPick/kGCRepositoryState_RebaseInteractive, but upon taking a quick peek at the usages of those 2 kGCRepositoryState_…s it doesn't look like there's much that would need to be done to get this to a state of not-crashing.

Thanks for making such a great tool!  GitUp has quickly replaced my usage of other Git tools in the week or so I've been using it, and I hope to have some time to contribute back soon!

swisspol commented 7 years ago

Thanks for the detailed report!