blob: e7274e103171b71f8730379c027cdb1281cb44ae [file] [log] [blame]
mmoss@chromium.org873a9d02014-09-09 22:09:53 +00001git-footers(1)
2==============
luqui@chromium.org0b887622014-09-03 02:31:03 +00003
4NAME
5----
6git-footers -
7include::_git-footers_desc.helper.txt[]
8
9SYNOPSIS
10--------
11[verse]
12'git footers' [--key FOOTER] REF
13'git footers' [--position | --position-ref | --position-num] REF
14
15DESCRIPTION
16-----------
17
18`git footers` extracts information included in commit messages as "footers",
19which are roughly like HTTP headers except they are at the end. For example, a
20commit might look like:
21
22 This is a fancy commit message.
23
24 Cr-Commit-Position: refs/heads/master@{#292272}
25 Tech-Debt-Introduced: 17 nanoMSOffices
26
27`git footers` knows how to extract this information.
28
29Footers are order-independent and can appear more than once. Thus they are
30treated as a multimap.
31
32OPTIONS
33-------
34
35If no options are given, all footers are printed, with their names
36case-normalized.
37
38--key FOOTER::
39 Extract all the headers associated with the given key, and print one per
40 line. If there are no footers with this key, produces no output and exits
41 successfully.
42
43--position::
44 Extract the Chrome commit position from the footers. This first attempts
45 to get the value of the `Cr-Commit-Position` footer. If that doesn't exist
46 then it tries a heuristic based on `Git-Svn-Id`. Output is in one of the
47 following forms:
48
49 refs/heads/master@{#292272}
50 refs/branch-heads/branchname
51
52--position-num::
53 Extracts and prints the Chrome commit position number only (292272 in the
54 example above). Exits with an error if one cannot be found.
55
56--position-ref::
57 Extracts and prints the Chrome commit position ref name only
58 (`ref/heads/master` or `refs/branch-heads/branchname` in the example above).
59
60
61EXAMPLE
62-------
63demo:1[]
64
65SEE ALSO
66--------
67linkgit:git-number[1]
68
69include::_footer.txt[]
70
71// vim: ft=asciidoc: