]> git.ipfire.org Git - thirdparty/git.git/blobdiff - Documentation/pretty-formats.txt
Merge branch 'mk/pb-pretty-email-without-domain-part-fix'
[thirdparty/git.git] / Documentation / pretty-formats.txt
index 8939acda96a710cd433620f255efd50b9f6bb7f5..84bbc7439a601b2e18a7ea48af9cfcdd62353e64 100644 (file)
@@ -4,7 +4,7 @@ PRETTY FORMATS
 If the commit is a merge, and if the pretty-format
 is not 'oneline', 'email' or 'raw', an additional line is
 inserted before the 'Author:' line.  This line begins with
-"Merge: " and the sha1s of ancestral commits are printed,
+"Merge: " and the hashes of ancestral commits are printed,
 separated by spaces.  Note that the listed commits may not
 necessarily be the list of the *direct* parent commits if you
 have limited your view of history: for example, if you are
@@ -20,20 +20,20 @@ built-in formats:
 
 * 'oneline'
 
-         <sha1> <title line>
+         <hash> <title line>
 +
 This is designed to be as compact as possible.
 
 * 'short'
 
-         commit <sha1>
+         commit <hash>
          Author: <author>
 
              <title line>
 
 * 'medium'
 
-         commit <sha1>
+         commit <hash>
          Author: <author>
          Date:   <author date>
 
@@ -43,7 +43,7 @@ This is designed to be as compact as possible.
 
 * 'full'
 
-         commit <sha1>
+         commit <hash>
          Author: <author>
          Commit: <committer>
 
@@ -53,7 +53,7 @@ This is designed to be as compact as possible.
 
 * 'fuller'
 
-         commit <sha1>
+         commit <hash>
          Author:     <author>
          AuthorDate: <author date>
          Commit:     <committer>
@@ -63,19 +63,36 @@ This is designed to be as compact as possible.
 
               <full commit message>
 
+* 'reference'
+
+         <abbrev hash> (<title line>, <short author date>)
++
+This format is used to refer to another commit in a commit message and
+is the same as `--pretty='format:%C(auto)%h (%s, %ad)'`.  By default,
+the date is formatted with `--date=short` unless another `--date` option
+is explicitly specified.  As with any `format:` with format
+placeholders, its output is not affected by other options like
+`--decorate` and `--walk-reflogs`.
+
 * 'email'
 
-         From <sha1> <date>
+         From <hash> <date>
          From: <author>
          Date: <author date>
          Subject: [PATCH] <title line>
 
          <full commit message>
 
+* 'mboxrd'
++
+Like 'email', but lines in the commit message starting with "From "
+(preceded by zero or more ">") are quoted with ">" so they aren't
+confused as starting a new commit.
+
 * 'raw'
 +
 The 'raw' format shows the entire commit exactly as
-stored in the commit object.  Notably, the SHA-1s are
+stored in the commit object.  Notably, the hashes are
 displayed in full, regardless of whether --abbrev or
 --no-abbrev are used, and 'parents' information show the
 true parent commits, without taking grafts or history
@@ -172,6 +189,7 @@ The placeholders are:
 '%at':: author date, UNIX timestamp
 '%ai':: author date, ISO 8601-like format
 '%aI':: author date, strict ISO 8601 format
+'%as':: author date, short format (`YYYY-MM-DD`)
 '%cn':: committer name
 '%cN':: committer name (respecting .mailmap, see
        linkgit:git-shortlog[1] or linkgit:git-blame[1])
@@ -187,6 +205,7 @@ The placeholders are:
 '%ct':: committer date, UNIX timestamp
 '%ci':: committer date, ISO 8601-like format
 '%cI':: committer date, strict ISO 8601 format
+'%cs':: committer date, short format (`YYYY-MM-DD`)
 '%d':: ref names, like the --decorate option of linkgit:git-log[1]
 '%D':: ref names without the " (", ")" wrapping.
 '%S':: ref name given on the command line by which the commit was reached
@@ -213,6 +232,7 @@ endif::git-rev-list[]
 '%GF':: show the fingerprint of the key used to sign a signed commit
 '%GP':: show the fingerprint of the primary key whose subkey was used
        to sign a signed commit
+'%GT':: show the trust level for the key used to sign a signed commit
 '%gD':: reflog selector, e.g., `refs/stash@{1}` or `refs/stash@{2
        minutes ago}`; the format follows the rules described for the
        `-g` option. The portion before the `@` is the refname as