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