From: Junio C Hamano <gitster@pobox.com>
To: Christian Couder <chriscool@tuxfamily.org>
Cc: christian.couder@gmail.com, git@vger.kernel.org,
johan@herland.net, josh@joshtriplett.org, tr@thomasrast.ch,
mhagger@alum.mit.edu, dan.carpenter@oracle.com, greg@kroah.com
Subject: Re: [RFC/PATCH] Add interpret-trailers builtin
Date: Wed, 06 Nov 2013 12:42:28 -0800 [thread overview]
Message-ID: <xmqq7gcl8dor.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <20131106.211659.1008913569403460043.chriscool@tuxfamily.org> (Christian Couder's message of "Wed, 06 Nov 2013 21:16:59 +0100 (CET)")
Christian Couder <chriscool@tuxfamily.org> writes:
> From: Junio C Hamano <gitster@pobox.com>
>
>> Christian Couder <christian.couder@gmail.com> writes:
>>
>>> To append a s-o-b only if there is no s-o-b already, one would need to use:
>>>
>>> [trailer "signoff"]
>>> key = "Signed-off-by:"
>>> if_exist = dont_append
>>> if_missing = append
>>> command = echo "$GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>"'
>>
>> But that is insufficient to emulate what we do, no? I.e. append
>> unless the last one is from the same person we are about to add.
>
> Yeah, but, with DONT_REPEAT_PREVIOUS, it would be possible using:
>
> [trailer "signoff"]
> key = "Signed-off-by:"
> if_exist = dont_repeat_previous
> if_missing = append
> command = echo "$GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>"'
Anything is possible, but "possible" does not justify "it is better
way than other possible ways".
What are the plausible values for if_missing? If if_missing needs
"prepend", for example, in addition to "append", does it mean
if_exist also needs corresponding "prepend" variant for the value
"dont_repeat_previous" you would give to if_exist?
Having two that are seemingly independent configuration does not
seem to be helping in reducing complexity (by keeping settings that
can be independently set orthogonal, by saying "if the other rule
decides to add, do we append, prepend, insert at the middle?", for
example).
How would one differentiate between "there is a field with that key"
and "there is a field with that <key, value> combination" with a
single if_exist? Add another variable if_exist_exact?
next prev parent reply other threads:[~2013-11-06 20:42 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-03 21:17 [RFC/PATCH] Add interpret-trailers builtin Christian Couder
2013-11-04 1:01 ` Johan Herland
2013-11-04 19:12 ` Junio C Hamano
2013-11-05 2:45 ` Johan Herland
2013-11-05 5:42 ` Christian Couder
2013-11-05 19:09 ` Junio C Hamano
2013-11-04 19:02 ` Junio C Hamano
2013-11-06 6:43 ` Christian Couder
2013-11-06 9:23 ` Christian Couder
2013-11-06 17:18 ` Junio C Hamano
2013-11-06 20:16 ` Christian Couder
2013-11-06 20:42 ` Junio C Hamano [this message]
2013-11-07 14:57 ` Christian Couder
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=xmqq7gcl8dor.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=chriscool@tuxfamily.org \
--cc=christian.couder@gmail.com \
--cc=dan.carpenter@oracle.com \
--cc=git@vger.kernel.org \
--cc=greg@kroah.com \
--cc=johan@herland.net \
--cc=josh@joshtriplett.org \
--cc=mhagger@alum.mit.edu \
--cc=tr@thomasrast.ch \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.