Thread (4 messages) flat view 4 messages, 2 authors, 2016-08-04

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

From: Johannes Schindelin <hidden>
Date: 2016-08-03 17:04:53

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help