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

[PATCH] doc: mention user-configured trailers

From
JTJonathan Tan <jonathantanmy@google.com>
Date
Nov 21, 2016, 20:47 UTC
Message-ID
<1479761241-26284-1-git-send-email-jonathantanmy@google.com>
In-Reply-To
<CA+P7+xrQEBYQQhqJQQCpLrs+4WOJOvH1X27w5Ou=2VPT=FegGQ@mail.gmail.com>

In commit 1462450 ("trailer: allow non-trailers in trailer block", 2016-10-21), functionality was added (and tested [1]) to allow non-trailer lines in trailer blocks, as long as those blocks contain at least one Git-generated or user-configured trailer, and consists of at least 25% trailers. The documentation was updated to mention this new functionality, but did not mention "user-configured trailer".

Further update the documentation to also mention "user-configured trailer".

[1] "with non-trailer lines mixed with a configured trailer" in t/t7513-interpret-trailers.sh

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
---

Yes, mentioning a trailer in a Git config will cause interpret-trailers to treat it similarly to a Git-generated trailer (in that its presence causes a block partially consisting of trailers to be considered a trailer block). See the commit message above for a test case that verifies that.

I took a look at the documentation, and it wasn't completely documented, so here is a patch to correct that.

 Documentation/git-interpret-trailers.txt | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Documentation/git-interpret-trailers.txt b/Documentation/git-interpret-trailers.txt
index e99bda6..09074c7 100644
--- a/Documentation/git-interpret-trailers.txt
+++ b/Documentation/git-interpret-trailers.txt
@@ -49,7 +49,8 @@ will be added before the new trailer.
 
 Existing trailers are extracted from the input message by looking for
 a group of one or more lines that (i) are all trailers, or (ii) contains at
-least one Git-generated trailer and consists of at least 25% trailers.
+least one Git-generated or user-configured trailer and consists of at
+least 25% trailers.
 The group must be preceded by one or more empty (or whitespace-only) lines.
 The group must either be at the end of the message or be the last
 non-whitespace lines before a line that starts with '---'. Such three
-- 
2.8.0.rc3.226.g39d4020
Previous: Keller, Jacob ENext: Junio C Hamano
Message 8 of 9 in “add format specifiers to display trailers”
  1. 0/2 add format specifiers to display trailersJacob Keller, Nov 18, 2016
  2. 1/2 pretty: add %bT format for displaying trailers of a commit messageJacob Keller, Nov 18, 2016
  3. 2/2 ref-filter: add support to display trailers as part of contentsJacob Keller, Nov 18, 2016
  4. Junio C HamanoNov 18, 2016
  5. Jacob KellerNov 18, 2016
  6. Junio C HamanoNov 21, 2016
  7. Keller, Jacob ENov 29, 2016
  8. doc: mention user-configured trailersJonathan Tan, Nov 21, 2016
  9. Junio C HamanoNov 21, 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.