On Wed, Mar 13, 2019 at 11:40:54PM +0100, Johannes Schindelin wrote: > > > + shift > > > + test -z "$*" || > > > + echo "exec $0 $*" >>$GIT_REBASE_TODO > > > > And here we do the same thing. That second redirection is unnecessary. > > It is actually not unnecessary, but to the contrary quite necessary to > achieve the intended effect: with this command, we append an `exec` line > to the todo list that is guaranteed to be executed after the `pick` > command that we added earlier. Ah, right, I was totally misreading it. We are not execing _now_, but rather appending an exec. And that explains my confusion about recursion. So your nice explanation below has gone to waste, because I have just now understood what is going on. ;) I agree that what you have here is probably the simplest way of demonstrating the issue. -Peff