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

Re: [PATCH RFC] git-am: support any number of signatures

From
Jeff King <peff@peff.net>
Date
Oct 7, 2014, 21:39 UTC
Message-ID
<20141007213859.GB24508@peff.net>
In-Reply-To
<20141007212937.GA14632@redhat.com>
On Wed, Oct 08, 2014 at 12:29:37AM +0300, Michael S. Tsirkin wrote:
Show 16 quoted lines
> > If I understand it correctly, Michael is envisioning to implement
> > his "git am -s art" (I would recommend against reusing -s for this,
> > though.  "git am --trailer art" is fine) and doing so by using
> > interpret-trailers as an internal implementation detail, so I would
> > say the above is a perfectly fine way to do so.  An equivalent of
> > that command line is synthesized and run internally in his version
> > of "git am" when his "git am" sees "--trailer art" option using
> > those am.{"a","r","t"}.trailer configuration variables.
> 
> Hmm I wonder why do you dislike reusing -s with a parameter for this.
> To me, this looks like a superset of the default -s functionality: -s
> adds the default signature, -s "x" adds signature "x" ...  Users don't
> really care that one is implemented as a trailer and another isn't.  In
> fact, default -s can be implemented as a trailer too, right?
> 
> Could you clarify please?

Optional parameters for arguments make backwards-compatibility tricky. In this case, the command:

  git am -s mbox1 mbox2

means "apply the patches from mbox1 and mbox2, and signoff the patches". Under your scheme, it now means "apply from mbox2, and use the trailer mbox1".

I think it would make more sense for "-s" to use a trailer called "signoff" if it is configured (and if not, have a baked-in "signoff" trailer config that behaves like "-s" does now). So "-s" (and "--signoff") become "sign off in the way I usually do for my project", not just "add a signed-off-by line". If you want to something more fancy, you have to use "--trailer=...".

Just my two cents, as one who has not been closely following this discussion. Apologies if this idea was already presented and shot down. :)

-Peff
Previous: Michael S. TsirkinNext: Junio C Hamano
Message 24 of 31 in “git-am: support any number of signatures”
  1. git-am: support any number of signaturesMichael S. Tsirkin, Jun 12, 2014
  2. Junio C HamanoJun 12, 2014
  3. Michael S. TsirkinJun 13, 2014
  4. Junio C HamanoJun 13, 2014
  5. Michael S. TsirkinJun 15, 2014
  6. Junio C HamanoJun 16, 2014
  7. Michael S. TsirkinJun 18, 2014
  8. Junio C HamanoJun 18, 2014
  9. Michael S. TsirkinJun 18, 2014
  10. Junio C HamanoJun 18, 2014
  11. Michael S. TsirkinJun 18, 2014
  12. Michael S. TsirkinSep 22, 2014
  13. Junio C HamanoSep 22, 2014
  14. Christian CouderSep 23, 2014
  15. Michael S. TsirkinSep 23, 2014
  16. Christian CouderSep 24, 2014
  17. Michael S. TsirkinOct 7, 2014
  18. Junio C HamanoSep 23, 2014
  19. Junio C HamanoSep 25, 2014
  20. Christian CouderSep 25, 2014
  21. Junio C HamanoSep 25, 2014
  22. Christian CouderSep 28, 2014
  23. Michael S. TsirkinOct 7, 2014
  24. Jeff KingOct 7, 2014
  25. Junio C HamanoOct 7, 2014
  26. René ScharfeJun 12, 2014
  27. Michael S. TsirkinJun 13, 2014
  28. Christian CouderOct 12, 2014
  29. Christian CouderOct 13, 2014
  30. Junio C HamanoOct 13, 2014
  31. Christian CouderOct 14, 2014

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.