From: Junio C Hamano Date: Thu, 17 Mar 2016 07:50:09 GMT Subject: Re: [PATCH] rebase -x: do not die without -i Message-ID: In-Reply-To: <1458177584-11378-1-git-send-email-sbeller@google.com> Stefan Beller writes: > In the later steps of preparing a patch series I do not want to edit the > patches any more, but just make sure the test suite passes after each > patch. Currently I would run > > EDITOR=true git rebase -i -x "make test" Hmm, I guess that may "work" but it sounds like quite a roundabout way to "test all commits". "rebase" is about replaying history to end up with a set of newly minted commits, and being able to poke at the state each commit records in the working tree is a side effect. "rebase -i" may use the same commit object if you didn't actually make new commit as an optimization, but otherwise, it is like going through pages of a book, tearing each page to examine it, and replacing each page with a photocopy of it before going to examine the next page. Which makes me feel somewhat dirty X-<. In other words, that looks like a workaround for not having $ git for-each-rev -x "$command" old..new where you can write "sh -c 'git checkout $1 && make test' -" as your $command.