git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: git@vger.kernel.org, bafain@gmail.com, sunshine@sunshineco.com
Subject: Re: [PATCH 1/4] rebase -i: add ack action
Date: Mon, 11 Apr 2016 13:02:07 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.20.1604111239100.2967@virtualbox> (raw)
In-Reply-To: <1460296343-17304-2-git-send-email-mst@redhat.com>

Hi Michael,

On Sun, 10 Apr 2016, Michael S. Tsirkin wrote:

> This implements a new ack! action for git rebase -i
> It is essentially a middle ground between fixup! and squash!:
> - commits are squashed silently without editor being started
> - commit logs are concatenated (with action line being discarded)
> - because of the above, empty commits aren't discarded,
>   their log is also included.
> 
> I am using it as follows:
> 	git am -s < mailbox #creates first commit
> 	hack ...
> 	get mail with Ack
> 	git commit --allow-empty -m `cat <<-EOF
> 	ack! first
> 
> 	Acked-by: maintainer
> 	EOF`
> 	repeat cycle
> 	git rebase --autosquash -i origin/master
> 	before public branch push
> 
> The "cat" command above is actually a script that
> parses the Ack mail to create the empty commit -
> to be submitted separately.

This looks awfully complicated, still, and not very generic.

How about making it easier to use, and much, much more generic, like this?

1. introducing an `--add-footer` flag to `git commit` that you could use
like this:

	git commit --amend --add-footer "Acked-by: Bugs Bunny"

2. introducing an `--exec-after` flag to `git commit` that would be a new
sibling of `--fixup` and `--squash` and would work like this:

	git commit --exec-after HEAD~5 \
		'git commit --amend --add-footer "Acked-by: Bugs Bunny"'

(it should imply `--allow-empty`, of course, and probably even fail if
anything was staged for commit at that point.) The commit message would
then look something like

	exec-after! Fix broken breakage

	git commit --amend --add-footer "Acked-by: Bugs Bunny"

This way would obviously benefit a lot more users. For example, you could
easily say (and alias)

	git commit --amend --add-footer 'Reviewed-by: Arrested Developer"

i.e. support all kind of use cases where developers need to slap on
footers in a quick & easy way.

And the --exec-after option would obviously have *a lot* more use cases
than just squashing in ACKs.

Ciao,
Johannes

  reply	other threads:[~2016-04-11 11:02 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-10 13:54 [PATCH 0/4] support for ack commits Michael S. Tsirkin
2016-04-10 13:54 ` [PATCH 1/4] rebase -i: add ack action Michael S. Tsirkin
2016-04-11 11:02   ` Johannes Schindelin [this message]
2016-04-11 11:24     ` Michael S. Tsirkin
2016-04-11 15:36       ` Johannes Schindelin
2016-04-11 16:41         ` Michael S. Tsirkin
2016-04-11 19:48           ` Junio C Hamano
2016-04-11 19:55             ` Michael S. Tsirkin
2016-04-11 20:03               ` Matthieu Moy
2016-04-12  7:51                 ` Michael S. Tsirkin
2016-04-12 16:07                 ` Junio C Hamano
2016-04-12 16:33                   ` Michael S. Tsirkin
2016-04-12 20:00                     ` Junio C Hamano
2016-04-11 12:05     ` Christian Neukirchen
2016-04-10 13:54 ` [PATCH 2/4] git-rebase: document ack Michael S. Tsirkin
2016-04-10 13:54 ` [PATCH 3/4] rebase: test ack Michael S. Tsirkin
2016-04-10 13:54 ` [PATCH 4/4] git-ack: record an ack Michael S. Tsirkin
  -- strict thread matches above, loose matches on Subject: below --
2014-05-18 21:17 [PATCH 0/4] ack recoding in commit log Michael S. Tsirkin
2014-05-18 21:17 ` [PATCH 1/4] rebase -i: add ack action Michael S. Tsirkin

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.1604111239100.2967@virtualbox \
    --to=johannes.schindelin@gmx.de \
    --cc=bafain@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=sunshine@sunshineco.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).