git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.

Previous: Johannes SchindelinNext: Johannes Schindelin
Message 4 of 6 in “rebase -x: do not die without -i”
  1. rebase -x: do not die without -iStefan Beller, Mar 17, 2016
  2. Johannes SixtMar 17, 2016
  3. Johannes SchindelinMar 17, 2016
  4. Junio C HamanoMar 17, 2016
  5. Johannes SchindelinMar 17, 2016
  6. Junio C HamanoMar 17, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.