Re: [PATCH] rebase -x: do not die without -i
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 17, 2016, 07:50 UTC
- Message-ID
- <xmqq4mc535n2.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <1458177584-11378-1-git-send-email-sbeller@google.com>
Stefan Beller <sbeller@google.com> writes:
Show 5 quoted lines
> 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 <anchor> -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.