From: Junio C Hamano Date: Fri, 6 May 2016 21:53:23 +0000 (-0700) Subject: Merge branch 'kn/for-each-tag-branch' into maint X-Git-Tag: v2.8.3~28 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/c75fb77d9af4c640ddebfe17bbf45e46bb2a68a8?ds=inline;hp=-c Merge branch 'kn/for-each-tag-branch' into maint A minor documentation update. * kn/for-each-tag-branch: for-each-ref: fix description of '--contains' in manpage --- c75fb77d9af4c640ddebfe17bbf45e46bb2a68a8 diff --combined Documentation/git-for-each-ref.txt index 012e8f9a08,576b079039..c52578bb87 --- a/Documentation/git-for-each-ref.txt +++ b/Documentation/git-for-each-ref.txt @@@ -76,7 -76,7 +76,7 @@@ OPTION specified commit (HEAD if not specified). --contains []:: - Only list tags which contain the specified commit (HEAD if not + Only list refs which contain the specified commit (HEAD if not specified). FIELD NAMES @@@ -92,11 -92,7 +92,11 @@@ refname: The name of the ref (the part after $GIT_DIR/). For a non-ambiguous short name of the ref append `:short`. The option core.warnAmbiguousRefs is used to select the strict - abbreviation mode. + abbreviation mode. If `strip=` is appended, strips `` + slash-separated path components from the front of the refname + (e.g., `%(refname:strip=2)` turns `refs/tags/foo` into `foo`. + `` must be a positive integer. If a displayed ref has fewer + components than ``, the command aborts with an error. objecttype:: The type of the object (`blob`, `tree`, `commit`, `tag`). @@@ -131,30 -127,10 +131,30 @@@ color: Change output color. Followed by `:`, 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 `` is either left, + right or middle, default being left and `` is the total + length of the content with alignment. For brevity, the + "width=" and/or "position=" prefixes may be omitted, and bare + and used instead. For instance, + `%(align:,)`. 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. +For commit and tag objects, the special `creatordate` and `creator` +fields will correspond to the appropriate date or name-email-date tuple +from the `committer` or `tagger` fields depending on the object type. +These are intended for working on a mix of annotated and lightweight tags. + 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. @@@ -163,23 -139,20 +163,23 @@@ The complete message in a commit and ta 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`). +For sorting purposes, fields with numeric values sort in numeric order +(`objectsize`, `authordate`, `committerdate`, `creatordate`, `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. As a special case for the date-type fields, you may specify a format for -the date by adding one of `:default`, `:relative`, `:short`, `:local`, -`:iso8601`, `:rfc2822` or `:raw` to the end of the fieldname; e.g. -`%(taggerdate:relative)`. +the date by adding `:` followed by date format name (see the +values the `--date` option to linkgit::git-rev-list[1] takes). EXAMPLES