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

Re: [RFC/PATCH] rebase--interactive: Add "sign" command

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Aug 3, 2016, 15:19 UTC
Message-ID
<alpine.DEB.2.20.1608031714410.107993@virtualbox>
In-Reply-To
<alpine.DEB.2.20.1608031621590.107993@virtualbox>
Hi Chris,
On Wed, 3 Aug 2016, Johannes Schindelin wrote:
> I can understand how this "sign" command helps you. I myself wished for
> new commands when working on my Git garden shears [*1*] (essentially, what
> git rebase --interactive --preserve-merges *should* have been).

And of course I forgot to provide the footnote. Sigh. So here they are, the Git garden shears, intended to rebase a thicket of branches:

https://github.com/git-for-windows/build-extra/blob/master/shears.sh
The edit script will look somewhat like this:
	mark onto
	# branch "something"
	bud
	pick abcdef first commit
	pick abcde0 second commit
	mark something
	# branch "another-one"
	bud
	pick cafebabe yep, that's a different branch
	mark another-one
	bud
	merge -C 0123456 something
	merge -C 6543210 another-one
	cleanup something another-one

So you see, I needed to introduce new commands: bud, mark, merge and cleanup (I actually also added a "reset" one).

The fake editor I talked about is really the script itself, which detects that it was run as the fake editor, and which converts all those commands into the form "exec git .r <command> <parameters>...". The alias..r setting also points to the same script, so that I really only need one script. It's one big hack, but it works.

Needless to say, my idea to support new rebase -i commands via config settings would be something I would use myself in the Git garden shears.

Ciao, Johannes

Previous: Johannes SchindelinNext: Junio C Hamano
Message 3 of 11 in “rebase--interactive: Add "sign" command”
  1. rebase--interactive: Add "sign" commandChris Packham, Aug 3, 2016
  2. Johannes SchindelinAug 3, 2016
  3. Johannes SchindelinAug 3, 2016
  4. Junio C HamanoAug 3, 2016
  5. Johannes SchindelinAug 3, 2016
  6. Jeff KingAug 3, 2016
  7. Chris PackhamAug 4, 2016
  8. Junio C HamanoAug 4, 2016
  9. Johannes SchindelinAug 5, 2016
  10. Chris PackhamAug 4, 2016
  11. Junio C HamanoAug 3, 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.