Re: Signed-off-by vs Reviewed-by
- From
- Miklos Vajna <vmiklos@collabora.co.uk>
- Date
- Apr 1, 2016, 14:10 UTC
- Message-ID
- <20160401141036.GG800@collabora.co.uk>
- In-Reply-To
- <xmqqtwjmpq6b.fsf@gitster.mtv.corp.google.com>
Hi,
On Thu, Mar 31, 2016 at 09:28:44AM -0700, Junio C Hamano <gitster@pobox.com> wrote:
Show 5 quoted lines
> The internal "parse the existing trailer block and manipulate it by > adding, conditionally adding, replacing and deleting it" logic was > done as an experimental "interpret-trailers" program, but polishing > it (both its design and implementation) and integrating it to the > front-line programs (e.g. "git commit") hasn't been done.
I had a look at interpret-trailers, and one use-case I miss is: being able to define a trailer type, but only add it when asked explicitly.
Example:
---- $ git config trailer.review.key "Reviewed-by: " $ git config trailer.review.command 'echo "$(git config user.name) <$(git config user.email)>"' $ echo foo|git interpret-trailers foo
Reviewed-by: A U Thor <author@example.com> $ echo foo|git interpret-trailers --trailer review foo
Reviewed-by: A U Thor <author@example.com> ----
I can imagine e.g. a new configuration vaulue named trailer.<token>.ifMissing explicit, and when that's set, the trailer would be only added if it's spelled out explicitly using '--trailer <token>'.
Does this sound like a good idea, or did I miss some way how this is already possible? :-)
Show 7 quoted lines
> As to the last step of "integration", we cannot use short-and-sweet > single letter options like '-s' (for sign-off) for each and every > custom trailer different projects use for their own purpose (as > there are only 26 of the lowercase ASCII alphabet letters), so the > most general syntax for the option has to become "--trailer <arg>" > or some variation of it, and at that point "-s" would look like a > short-hand for "--trailer signed-off-by".
Hmm, I think the above has to be implemented first, otherwise it'll be hard to make "-s" an alias of "--trailer signed-off-by". (I mean having git understand what "signed-off-by" is, still adding it conditionally.)
Regards,
Miklos