diff options
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/git-for-each-ref.txt | 17 | ||||
-rw-r--r-- | Documentation/git-tag.txt | 27 |
2 files changed, 36 insertions, 8 deletions
diff --git a/Documentation/git-for-each-ref.txt b/Documentation/git-for-each-ref.txt index d6a1abcca5..c6f073cea4 100644 --- a/Documentation/git-for-each-ref.txt +++ b/Documentation/git-for-each-ref.txt @@ -127,6 +127,17 @@ color:: Change output color. Followed by `:<colorname>`, where names are described in `color.branch.*`. +align:: + Left-, middle-, or right-align the content between + %(align:...) and %(end). The "align:" is followed by `<width>` + and `<position>` in any order separated by a comma, where the + `<position>` is either left, right or middle, default being + left and `<width>` is the total length of the content with + alignment. If the contents length is more than the width then + no alignment is performed. If used with '--quote' everything + in between %(align:...) and %(end) is quoted, but if nested + then only the topmost level performs quoting. + In addition to the above, for commit and tag objects, the header field names (`tree`, `parent`, `object`, `type`, and `tag`) can be used to specify the value in the header field. @@ -139,12 +150,16 @@ 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. Finally, the optional GPG signature is `contents:signature`. +blank line. The optional GPG signature is `contents:signature`. The +first `N` lines of the message is obtained using `contents:lines=N`. For sorting purposes, fields with numeric values sort in numeric order (`objectsize`, `authordate`, `committerdate`, `taggerdate`). All other fields are used to sort in their byte-value order. +There is also an option to sort by versions, this can be done by using +the fieldname `version:refname` or its alias `v:refname`. + In any case, a field name that refers to a field inapplicable to the object referred by the ref does not cause an error. It returns an empty string instead. diff --git a/Documentation/git-tag.txt b/Documentation/git-tag.txt index 84f6496bf2..3803bf7fb9 100644 --- a/Documentation/git-tag.txt +++ b/Documentation/git-tag.txt @@ -13,7 +13,8 @@ SYNOPSIS <tagname> [<commit> | <object>] 'git tag' -d <tagname>... 'git tag' [-n[<num>]] -l [--contains <commit>] [--points-at <object>] - [--column[=<options>] | --no-column] [--create-reflog] [<pattern>...] + [--column[=<options>] | --no-column] [--create-reflog] [--sort=<key>] + [--format=<format>] [--[no-]merged [<commit>]] [<pattern>...] 'git tag' -v <tagname>... DESCRIPTION @@ -94,14 +95,16 @@ OPTIONS using fnmatch(3)). Multiple patterns may be given; if any of them matches, the tag is shown. ---sort=<type>:: - Sort in a specific order. Supported type is "refname" - (lexicographic order), "version:refname" or "v:refname" (tag +--sort=<key>:: + Sort based on the key given. Prefix `-` to sort in + descending order of the value. You may use the --sort=<key> option + multiple times, in which case the last key becomes the primary + key. Also supports "version:refname" or "v:refname" (tag names are treated as versions). The "version:refname" sort order can also be affected by the - "versionsort.prereleaseSuffix" configuration variable. Prepend - "-" to reverse sort order. When this option is not given, the - sort order defaults to the value configured for the 'tag.sort' + "versionsort.prereleaseSuffix" configuration variable. + The keys supported are the same as those in `git for-each-ref`. + Sort order defaults to the value configured for the 'tag.sort' variable if it exists, or lexicographic order otherwise. See linkgit:git-config[1]. @@ -156,6 +159,16 @@ This option is only applicable when listing tags without annotation lines. The object that the new tag will refer to, usually a commit. Defaults to HEAD. +<format>:: + A string that interpolates `%(fieldname)` from the object + pointed at by a ref being shown. The format is the same as + that of linkgit:git-for-each-ref[1]. When unspecified, + defaults to `%(refname:short)`. + +--[no-]merged [<commit>]:: + Only list tags whose tips are reachable, or not reachable + if '--no-merged' is used, from the specified commit ('HEAD' + if not specified). CONFIGURATION ------------- |