drewdeponte / git-ps-rs

Official git-ps Rust implementation - the future of git-ps
https://git-ps.sh
MIT License
78 stars 8 forks source link

`gps ls` not working after update #298

Open rgrinberg opened 5 months ago

rgrinberg commented 5 months ago

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.
drewdeponte commented 5 months ago

@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 commented 5 months ago

@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.

rgrinberg commented 5 months ago

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

drewdeponte commented 5 months ago

@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?