gitext-rs / git-stack

Stacked branch management for Git
Apache License 2.0
496 stars 19 forks source link

perf(cli): Split off highly divergent branches #220

Closed epage closed 2 years ago

epage commented 2 years ago

In https://github.com/gitext-rs/git-stack/discussions/216, a user is backporting changes on Linux and hadn't marked protected branches which would serve as bases, causing git-stack to topologically sort commits that are very distant from each other, causing a simple showing of the commit graph to take 20-30s.

This change infers that these branches are do not belong to their base and split them off. Now showing the commit graph takes about 6s as it tries each base.