arxanas / git-branchless

High-velocity, monorepo-scale workflow for Git
Apache License 2.0
3.37k stars 80 forks source link

Feature request: catch signals and abort rebase before exiting #1255

Open jdupak opened 4 months ago

jdupak commented 4 months ago

When I mess up the command and hit ctrl+c, it leaves the rebase in progress, which is annoying. I would expect the git test to leave the repository in the same state it was before.

arxanas commented 3 months ago

I would accept a PR for this. Definitely agree that it's annoying, but I never had a chance to implement signal handling. One problem is that you might have to be sure to terminate the worker processes before you abort the rebase, as they may be doing something important with the working copy contents.