git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Christian Couder <christian.couder@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>,
	Git Mailing List <git@vger.kernel.org>,
	Christian Couder <chriscool@tuxfamily.org>
Subject: Re: [PATCH RFC] git-am: support any number of signatures
Date: Tue, 23 Sep 2014 11:07:00 +0300	[thread overview]
Message-ID: <20140923080700.GA16527@redhat.com> (raw)
In-Reply-To: <CAP8UFD2W1r9859FgpBXqvdNLAfXoCwjpEFpTKXU6fGuC_8uvBg@mail.gmail.com>

On Tue, Sep 23, 2014 at 09:45:50AM +0200, Christian Couder wrote:
> Hi Michael,
> 
> On Mon, Sep 22, 2014 at 4:01 PM, Michael S. Tsirkin <mst@redhat.com> wrote:
> >
> > Hi Junio, Christian,
> > it's been a while.
> > I see that the work on trailers is going on.
> > I tried going over the documentation but I could not figure
> > out how would one implement multiple signatures using the
> > trailers mechanism.
> >
> > As a reminder, this old patchset (that I replied to) enhanced git am -s
> > with an option to add different signatures depending on
> > the option passed to the -s flag.
> > E.g. I have
> > [am "a"]
> >         signoff = "Acked-by: Michael S. Tsirkin <mst@redhat.com>"
> >
> > [am "r"]
> >         signoff = "Reviewed-by: Michael S. Tsirkin <mst@redhat.com>"
> >
> > [am "t"]
> >         signoff = "Tested-by: Michael S. Tsirkin <mst@redhat.com>"
> >
> > and now:
> >         git am -s art
> > adds all 3 signatures when applying the patch.
> 
> This is probably not as simple as you would like but it works with
> something like:
> 
> $ git interpret-trailers --trailer "Acked-by: Michael S. Tsirkin
> <mst@redhat.com>" --trailer "Reviewed-by: Michael S. Tsirkin
> <mst@redhat.com>"  --trailer "Tested-by: Michael S. Tsirkin
> <mst@redhat.com>" 0001-foo.patch >to_apply/0001-foo.patch
> 
> and then:
> 
> $ git am to_apply/*.patch
> 
> Also by using something like:
> 
> $ git config trailer.a.key Acked-by
> $ git config trailer.r.key Reviewed-by
> $ git config trailer.t.key Tested-by

I would like multiple keys to match a specific
letter, e.g. as a maintainer I need
both reviewed by and signed off by when I
apply a patch, I like applying them with
a single "-s m".

> the first command could be simplified to:
> 
> $ git interpret-trailers --trailer "a: Michael S. Tsirkin
> <mst@redhat.com>" --trailer "r: Michael S. Tsirkin <mst@redhat.com>"
> --trailer "t: Michael S. Tsirkin <mst@redhat.com>" 0001-foo.patch
> >to_apply/0001-foo.patch
> 
> And if you use an env variable:
> 
> $ ME="Michael S. Tsirkin <mst@redhat.com>"
> $ git interpret-trailers --trailer "a: $ME" --trailer "r: $ME"
> --trailer "t: $ME" 0001-foo.patch >to_apply/0001-foo.patch
> 
> Maybe later we will integrate git interpret-trailers with git commit,
> git am and other commands, so that you can do directly:
> 
> git am --trailer "a: $ME" --trailer "r: $ME"  --trailer "t: $ME" 0001-foo.patch
> 
> Maybe we wil also assign a one letter shortcut to --trailer, for
> example "z", so that could be:
> 
> git am -z "a: $ME" -z "r: $ME"  -z "t: $ME" 0001-foo.patch

-s could apply here, right?
It doesn't have a parameter at the moment.

> We could also allow many separators in the same -z argument as long as
> they are separated by say "~",

I think -z a -z r -z t is enough.

> so you could have:
> 
> git am -z "a: $ME~r: $ME~t: $ME" 0001-foo.patch
> 
> And then we could also allow people to define default values for
> trailers with something like:
> 
> $ git config trailer.a.defaultvalue "Michael S. Tsirkin <mst@redhat.com>"
> $ git config trailer.r.defaultvalue "Michael S. Tsirkin <mst@redhat.com>"
> $ git config trailer.t.defaultvalue "Michael S. Tsirkin <mst@redhat.com>"

I'm kind of confused by the key/value concept.
Can't I define the whole 'Acked-by: Michael S. Tsirkin <mst@redhat.com>'
string as the key?


> So that in the end you could have:
> 
> git am -z a~r~t 0001-foo.patch
> 
> which is very close to "git am -s art".
> 
> Best,
> Christian.

If I figure out the defaultvalue thing, I might
find the time to work on git am integration.

  reply	other threads:[~2014-09-23  8:03 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-12 16:12 [PATCH RFC] git-am: support any number of signatures Michael S. Tsirkin
2014-06-12 19:07 ` Junio C Hamano
2014-06-13  8:00   ` Michael S. Tsirkin
2014-06-13 17:32     ` Junio C Hamano
2014-06-15 10:27       ` Michael S. Tsirkin
2014-06-16 18:06         ` Junio C Hamano
2014-06-18  3:09           ` Michael S. Tsirkin
2014-06-18  6:49             ` Junio C Hamano
2014-06-18  7:33               ` Michael S. Tsirkin
2014-06-18 17:51               ` Junio C Hamano
2014-06-18 18:23                 ` Michael S. Tsirkin
2014-09-22 14:01                 ` Michael S. Tsirkin
2014-09-22 17:58                   ` Junio C Hamano
2014-09-23  7:45                   ` Christian Couder
2014-09-23  8:07                     ` Michael S. Tsirkin [this message]
2014-09-24 10:00                       ` Christian Couder
2014-10-07 21:33                         ` Michael S. Tsirkin
2014-09-23 17:15                     ` Junio C Hamano
2014-09-25  5:04                       ` Junio C Hamano
2014-09-25 10:04                       ` Christian Couder
2014-09-25 16:20                         ` Junio C Hamano
2014-09-28 11:36                           ` Christian Couder
     [not found]                             ` <7viok7k0c0.fsf@alter.siamese.dyndns.org>
2014-10-12  9:36                               ` Christian Couder
2014-10-13  5:09                                 ` Christian Couder
2014-10-13 22:05                                   ` Junio C Hamano
2014-10-14  5:29                                     ` Christian Couder
2014-10-07 21:29                       ` Michael S. Tsirkin
2014-10-07 21:39                         ` Jeff King
2014-10-07 21:41                           ` Junio C Hamano
2014-06-12 19:25 ` René Scharfe
2014-06-13  8:01   ` 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=20140923080700.GA16527@redhat.com \
    --to=mst@redhat.com \
    --cc=chriscool@tuxfamily.org \
    --cc=christian.couder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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).