Re: [RFC/PATCH] Add interpret-trailers builtin

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Christian Couder <chriscool@xxxxxxxxxxxxx> writes:

> From: Junio C Hamano <gitster@xxxxxxxxx>
>
>> Christian Couder <christian.couder@xxxxxxxxx> 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?
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]