From: Christian Couder <chriscool@tuxfamily.org>
To: gitster@pobox.com
Cc: christian.couder@gmail.com, mst@redhat.com, git@vger.kernel.org
Subject: Re: [PATCH RFC] git-am: support any number of signatures
Date: Sun, 28 Sep 2014 13:36:23 +0200 (CEST) [thread overview]
Message-ID: <20140928.133623.1635797151132857721.chriscool@tuxfamily.org> (raw)
In-Reply-To: <CAPc5daUTKU1JepLuyVC1Nk6LG4AZ2TA5SEYLsTSPbPKkauzNyQ@mail.gmail.com>
From: Junio C Hamano <gitster@pobox.com>
> On Thu, Sep 25, 2014 at 3:04 AM, Christian Couder
> <christian.couder@gmail.com> wrote:
>>> To an existing message ends with Michael's Signed-off-by:, if his
>>> "git am --trailer arts" is called to add these three and then a
>>> Signed-off-by: from him, should it add an extra S-o-b (because his
>>> existing S-o-b will no longer be the last one after adding Acked and
>>> others), or should it refrain from doing so? Can you express both
>>> preferences?
>>
>> The default for "trailer.where" is "end", and for "trailer.ifexists"
>> it is "addIfDifferentNeighbor".
>> That means that by default it will add the four new trailers at the end.
>>
>> If either "trailer.ifexists" or "trailer.S-o-b.ifexists" is set to
>> "addIfDifferent", then only the first 3 new trailers will be added at
>> the end. So yes you can express both preferences.
>
> Suppose that the original ends with Sob, and Michael's "am" invokes
> interpret-trailers with Acked/Reviewed/Tested/Sob in this order. The first
> three are set to addifDifferent and Sob is set to addIfDifferentNeighbor,
> which would be the traditional and sensible default.
>
> Now, how is addIfDifferentNeighbor interpreted? Adding the new Sob
> with this single request to add these four is done on a message that
> has the same Sob at the end (i.e. Neighbor). Does _you_ adding of
> Acked/Reviewed/Tested invalidate the Neighbor-ness and you add the
> Sob anew?
The trailers are processed in the order they appear on the command
line. And when a trailer is processed, the input message it "sees" is
the result from the processing of all the previous trailers on the
command line. It is not any more the original input message.
So after Acked/Reviewed/Tested have been added, when the S-o-b at the
end of the command line is processed, it "sees" an input message that
has the Tested trailer at the end. That's why with
addIfDifferentNeighbor the S-o-b will still be added at the end.
> If that is what happens, it is not a workable workaround to set Sob to
> addIfDifferent only for this invocation.
Setting S-o-b to addIfDifferent for this invocation would not add the
S-o-b at the end, because another S-o-b still exists in the input
message "seen" when the last S-o-b is processed.
> Alternatively, if Neighbor-ness is evaluated first before you add A/R/T
> in response to this request, then you'd refrain from adding a duplicate
> Sob. It wasn't quite clear from your description what your design was,
> and your explanation above is not still clear, at least to me.
I hope it is clearer now. Maybe I should add something in the doc to
better explain how it works.
Thanks,
Christian.
next prev parent reply other threads:[~2014-09-28 11:36 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
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 [this message]
[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=20140928.133623.1635797151132857721.chriscool@tuxfamily.org \
--to=chriscool@tuxfamily.org \
--cc=christian.couder@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=mst@redhat.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).