No, there is no such program.
It would be difficult to write in general: the only way Git can know that you are finished editing the sequence control file is for you to exit the editor. Git can tell that you have exited the editor because Git itself started the editor, so it sees the exit.
Assuming you provide a magic solution to this problem,1 such a program would be relatively easy2 to write, once you decide precisely what it should do. That is, how would it attempt the rebase, and what state should it leave behind to mark success or failure? Presumably, whether it succeeds or fails, it should leave the repository and work-tree unchanged, so that when you exit the editor and invoke the rebase "for real", it can still happen.
Anyway, should you decide to attempt to write this, simply start with the existing rebase -i
script, which is in $(git --exec-path)/git-rebase--interactive
. Your task will be: strip out the "setup" and "finish" code paths (because you are already set up—you're just testing, and don't want to run post-rebase hooks, nor move branch pointers); add code to reset HEAD
to the starting-point; implement reword
as pick
instead of reword
(presumably you don't want to have your test script attempt to interact—but note that I am making assumptions here); and, I think the hardest part, figure out how to decide on "success" vs "failure".
1Probably, the magic solution is just to have a second window open, in which you run your "test my rebase" script.
2For some value of "easy".