]> git.ipfire.org Git - thirdparty/git.git/blobdiff - Documentation/git-tag.txt
Merge branch 'jp/tag-trailer'
[thirdparty/git.git] / Documentation / git-tag.txt
index 5fe519c31ec478e205223dbed919254a7ed4c610..4494729f5e167fd2c3c152ebbe275472a097f6d3 100644 (file)
@@ -10,6 +10,7 @@ SYNOPSIS
 --------
 [verse]
 'git tag' [-a | -s | -u <key-id>] [-f] [-m <msg> | -F <file>] [-e]
+       [(--trailer <token>[(=|:)<value>])...]
        <tagname> [<commit> | <object>]
 'git tag' -d <tagname>...
 'git tag' [-n[<num>]] -l [--contains <commit>] [--no-contains <commit>]
@@ -31,8 +32,8 @@ creates a 'tag' object, and requires a tag message.  Unless
 `-m <msg>` or `-F <file>` is given, an editor is started for the user to type
 in the tag message.
 
-If `-m <msg>` or `-F <file>` is given and `-a`, `-s`, and `-u <key-id>`
-are absent, `-a` is implied.
+If `-m <msg>` or `-F <file>` or `--trailer <token>[=<value>]` is given
+and `-a`, `-s`, and `-u <key-id>` are absent, `-a` is implied.
 
 Otherwise, a tag reference that points directly at the given object
 (i.e., a lightweight tag) is created.
@@ -178,6 +179,17 @@ This option is only applicable when listing tags without annotation lines.
        Implies `-a` if none of `-a`, `-s`, or `-u <key-id>`
        is given.
 
+--trailer <token>[(=|:)<value>]::
+       Specify a (<token>, <value>) pair that should be applied as a
+       trailer. (e.g. `git tag --trailer "Custom-Key: value"`
+       will add a "Custom-Key" trailer to the tag message.)
+       The `trailer.*` configuration variables
+       (linkgit:git-interpret-trailers[1]) can be used to define if
+       a duplicated trailer is omitted, where in the run of trailers
+       each trailer would appear, and other details.
+       The trailers can be extracted in `git tag --list`, using
+       `--format="%(trailers)"` placeholder.
+
 -e::
 --edit::
        The message taken from file with `-F` and command line with