git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Signed-off-by vs Reviewed-by

From
MVMiklos 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
Previous: Junio C HamanoNext: Jeff King
Message 9 of 11 in “Signed-off-by vs Reviewed-by”
  1. Miklos VajnaMar 31, 2016
  2. Pranit BauvaMar 31, 2016
  3. Miklos VajnaMar 31, 2016
  4. Sidhant SharmaMar 31, 2016
  5. Christian CouderMar 31, 2016
  6. Junio C HamanoMar 31, 2016
  7. Jeff KingMar 31, 2016
  8. Junio C HamanoMar 31, 2016
  9. Miklos VajnaApr 1, 2016
  10. Jeff KingMar 31, 2016
  11. Christian CouderMar 31, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.