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, 18:10 UTC
Message-ID
<xmqq37rp0ycx.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<alpine.DEB.2.20.1603171406080.4690@virtualbox>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 16 quoted lines
> And that is very, very much the purpose of the interactive rebase.
>
>>     $ git for-each-rev -x "$command" old..new
>> 
>> where you can write "sh -c 'git checkout $1 && make test' -" as
>> your $command.
>
> You meant
>
> 	git rev-list old...new |
> 	while read rev
> 	do
> 		$command || break
> 	done
>
> ?

Yeah, if I actually felt the lack of "for-each-ref -x" a problem (I don't), that is what I would have used instead (but with just two dots ;-).

But you are correct to point out that I didn't consider that "... and I want to fix right there if it breaks" is a part of the use case, mainly because the log message said this:

    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.
and partly I lack imagination.

If you throw in that extra "I want to fix right there if it breaks" requirement, it makes perfect sense to make use of the sequencing machinery we implement for "rebase -i", as the while loop above does not give you the same sequencing without extra work.

So perhaps the idea of the patch is good with a better explanation.
Previous: Johannes Schindelin
Message 6 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.