Let's avoid a big dense paragraph by using an unordered list for the %(contents:XXXX) format specifiers. Suggested-by: Jeff King <peff@xxxxxxxx> Signed-off-by: Christian Couder <chriscool@xxxxxxxxxxxxx> --- Documentation/git-for-each-ref.txt | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/Documentation/git-for-each-ref.txt b/Documentation/git-for-each-ref.txt index 6dcd39f6f6..2db9779d54 100644 --- a/Documentation/git-for-each-ref.txt +++ b/Documentation/git-for-each-ref.txt @@ -232,12 +232,24 @@ Fields that have name-email-date tuple as its value (`author`, `committer`, and `tagger`) can be suffixed with `name`, `email`, and `date` to extract the named component. -The complete message in a commit and tag object is `contents`. -Its first line is `contents:subject`, where subject is the concatenation -of all lines of the commit message up to the first blank line. The next -line is `contents:body`, where body is all of the lines after the first -blank line. The optional GPG signature is `contents:signature`. The -first `N` lines of the message is obtained using `contents:lines=N`. +The complete message of a commit or tag object is `contents`. This +field can also be used in the following ways: + +contents:subject:: + The "subject" of the commit or tag message. It's actually the + concatenation of all lines of the commit message up to the + first blank line. + +contents:body:: + The "body" of the commit or tag message. It's made of the + lines after the first blank line. + +contents:signature:: + The optional GPG signature. + +contents:lines=N:: + The first `N` lines of the message. + Additionally, the trailers as interpreted by linkgit:git-interpret-trailers[1] are obtained as `trailers` (or by using the historical alias `contents:trailers`). Non-trailer lines from the trailer block can be omitted -- 2.27.0.460.g66f3a24dd5