git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Chris Packham <judge.packham@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [RFC/PATCH] rebase--interactive: Add "sign" command
Date: Wed, 3 Aug 2016 17:19:46 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.20.1608031714410.107993@virtualbox> (raw)
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

  reply	other threads:[~2016-08-03 15:19 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-03  8:47 [RFC/PATCH] rebase--interactive: Add "sign" command Chris Packham
2016-08-03 14:31 ` Johannes Schindelin
2016-08-03 15:19   ` Johannes Schindelin [this message]
2016-08-03 16:08   ` Junio C Hamano
2016-08-03 16:15     ` Johannes Schindelin
2016-08-03 18:08     ` Jeff King
2016-08-04  0:53       ` Chris Packham
2016-08-04 16:05       ` Junio C Hamano
2016-08-05 16:04       ` Johannes Schindelin
2016-08-04  0:41   ` Chris Packham
2016-08-03 15:58 ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.20.1608031714410.107993@virtualbox \
    --to=johannes.schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=judge.packham@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).