git-ps-rs icon indicating copy to clipboard operation
git-ps-rs copied to clipboard

`gps ls` not working after update

Open rgrinberg opened this issue 1 year ago • 4 comments

I'm now getting the following error:

RUST_BACKTRACE=1 gps ls
thread 'main' panicked at src/ps/public/list.rs:314:14:
called `Result::unwrap()` on an `Err` value: GetListLocalBranchesWithInfoFailed(GetListBranchInfoFailed(GetPatchInfoCollectionFailed(GetCommonAncestor(MergeBase(Error { code: -3, klass: 22, message: "no merge base found" })))))
stack backtrace:
   0: _rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::result::unwrap_failed
   3: core::result::Result<T,E>::unwrap
   4: gps::ps::public::list::list
   5: gps::commands::list::list
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

rgrinberg avatar Mar 13 '24 23:03 rgrinberg

@rgrinberg what do you mean now? Did you just upgrade? If so what version were you running before and what version are you running now?

drewdeponte avatar Mar 14 '24 03:03 drewdeponte

@rgrinberg That error is telling us that during the state computation it failed to find a merge base (aka a common ancestor). I will have to go review that code and see if anything jumps out at me related to this. It definitely shouldn't be failing out. Because any state that you can properly have with Git proper should work with Git Patch Stack.

drewdeponte avatar Mar 14 '24 03:03 drewdeponte

Yes, I updated to a new version recently. I think I was using 6.9

rgrinberg avatar Mar 14 '24 19:03 rgrinberg

@rgrinberg I started looking into the code around this. Do you happen to have an orphan branch (a branch that has its own parentless root) in addition to main/master?

drewdeponte avatar Mar 15 '24 05:03 drewdeponte