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

Re: [RFC/PATCH] log: add log.firstparent option

From
Jeff King <peff@peff.net>
Date
Jul 25, 2015, 01:47 UTC
Message-ID
<20150725014722.GA17830@peff.net>
In-Reply-To
<20150725013634.GA7269@peff.net>
On Fri, Jul 24, 2015 at 06:36:34PM -0700, Jeff King wrote:
Show 12 quoted lines
> > I think in the cycle we merged Couder's trailer stuff we updated the
> > helper functions to locate where the S-o-b should go in an existing
> > message and consolidated (or, at least "talked about consolidating")
> > them into a single helper.  I do not think we wrote any special case
> > for "a line with three-dashes and nothing else on it" when we did
> > so, but that function would be the logical place to do so.
> 
> Yeah, it nicely has the concept of "ignore this footer". But we would
> want it only to kick in when doing emails (where the "---" is
> syntactically significant), I would think. So something like the patch
> below (no commit message because I'm in an airport right now; I'll add
> tests and repost in the next day or two).

This works for "format-patch -s". But I guess that leaves open the question of "commit --signoff". It should not matter when making a commit new (after all, you have not yet had a chance to put the "---" in). But something like "git commit --amend --signoff" might want to handle it. Of course we have no idea if any "---" we find there is meant to be an email notes-separator by the user, or if they happened to use "---" for something else[1] (which is a bad idea if you have an emailed patches workflow, but many people do not). So it's a bit riskier.

-Peff
[1] While reading the old "git commit --notes" thread recently, Johan
    Herland gave a plausible confusing example:
      What
      ----
      A commit message using markdown-like formatting conventions.
      Why
      ---
      To show that "---" can be part of a commit message. :)
Previous: Jeff KingNext: Junio C Hamano
Message 17 of 32 in “log: add log.firstparent option”
  1. log: add log.firstparent optionJeff King, Jul 23, 2015
  2. Config variables and scripting // was Re: [RFC/PATCH] log: add log.firstparent optionDavid Aguilar, Jul 23, 2015
  3. Jeff KingJul 23, 2015
  4. Jeff KingJul 23, 2015
  5. Jacob KellerJul 23, 2015
  6. Jeff KingJul 23, 2015
  7. Jacob KellerJul 23, 2015
  8. Michael J GruberJul 23, 2015
  9. Jeff KingJul 23, 2015
  10. Junio C HamanoJul 23, 2015
  11. Stefan BellerJul 23, 2015
  12. Jeff KingJul 24, 2015
  13. Jacob KellerJul 24, 2015
  14. Jeff KingJul 24, 2015
  15. Junio C HamanoJul 24, 2015
  16. Jeff KingJul 25, 2015
  17. Jeff KingJul 25, 2015
  18. Junio C HamanoJul 25, 2015
  19. Jeff KingJul 27, 2015
  20. Junio C HamanoJul 23, 2015
  21. Jacob KellerJul 24, 2015
  22. Jeff KingJul 24, 2015
  23. Jacob KellerJul 24, 2015
  24. Junio C HamanoJul 24, 2015
  25. Jeff KingJul 24, 2015
  26. Jeff KingJul 24, 2015
  27. Jeff KingJul 24, 2015
  28. Junio C HamanoJul 24, 2015
  29. Jeff KingJul 25, 2015
  30. Junio C HamanoJul 25, 2015
  31. Jacob KellerJul 25, 2015
  32. Jeff KingJul 27, 2015

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.