File: git-footers.1

package info (click to toggle)
chromium 139.0.7258.127-2
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 6,122,156 kB
  • sloc: cpp: 35,100,771; ansic: 7,163,530; javascript: 4,103,002; python: 1,436,920; asm: 946,517; xml: 746,709; pascal: 187,653; perl: 88,691; sh: 88,436; objc: 79,953; sql: 51,488; cs: 44,583; fortran: 24,137; makefile: 22,147; tcl: 15,277; php: 13,980; yacc: 8,984; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (148 lines) | stat: -rw-r--r-- 4,104 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
'\" t
.\"     Title: git-footers
.\"    Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
.\"      Date: 05/07/2025
.\"    Manual: Chromium depot_tools Manual
.\"    Source: depot_tools fab0a429
.\"  Language: English
.\"
.TH "GIT\-FOOTERS" "1" "05/07/2025" "depot_tools fab0a429" "Chromium depot_tools Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
git-footers \- Extract meta\-information expressed as footers in a commit message\&.
.SH "SYNOPSIS"
.sp
.nf
\fIgit footers\fR [\-\-key FOOTER] REF
\fIgit footers\fR [\-\-position | \-\-position\-ref | \-\-position\-num] REF
.fi
.sp
.SH "DESCRIPTION"
.sp
\fBgit footers\fR extracts information included in commit messages as "footers", which are roughly like HTTP headers except they are at the end\&. For example, a commit might look like:
.sp
.if n \{\
.RS 4
.\}
.nf
This is a fancy commit message\&.
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
Cr\-Commit\-Position: refs/heads/main@{#292272}
Tech\-Debt\-Introduced: 17 nanoMSOffices
.fi
.if n \{\
.RE
.\}
.sp
\fBgit footers\fR knows how to extract this information\&.
.sp
Footers are order\-independent and can appear more than once\&. Thus they are treated as a multimap\&.
.SH "OPTIONS"
.sp
If no options are given, all footers are printed, with their names case\-normalized\&.
.PP
\-\-key FOOTER
.RS 4
Extract all the headers associated with the given key, and print one per line\&. If there are no footers with this key, produces no output and exits successfully\&.
.RE
.PP
\-\-position
.RS 4
Extract the Chrome commit position from the footers\&. This first attempts to get the value of the
\fBCr\-Commit\-Position\fR
footer\&. If that doesn\(cqt exist then it tries a heuristic based on
\fBGit\-Svn\-Id\fR\&. Output is in one of the following forms:
.sp
.if n \{\
.RS 4
.\}
.nf
refs/heads/main@{#292272}
refs/branch\-heads/branchname
.fi
.if n \{\
.RE
.\}
.RE
.PP
\-\-position\-num
.RS 4
Extracts and prints the Chrome commit position number only (292272 in the example above)\&. Exits with an error if one cannot be found\&.
.RE
.PP
\-\-position\-ref
.RS 4
Extracts and prints the Chrome commit position ref name only (\fBref/heads/main\fR
or
\fBrefs/branch\-heads/branchname\fR
in the example above)\&.
.RE
.SH "EXAMPLE"
.sp

.sp
.if n \{\
.RS 4
.\}
.nf
\fB$ git footers HEAD\fR
Tech\-Debt\-Introduced: \-4 microMSOffices
Tech\-Debt\-Introduced: 17 microMSOffices
Cr\-Commit\-Position: refs/heads/main@{#292272}

\fB$ git footers \-\-key Tech\-Debt\-Introduced HEAD\fR
\-4 microMSOffices
17 microMSOffices

\fB$ git footers \-\-position HEAD\fR
refs/heads/main@{#292272}

\fB$ git footers \-\-position\-num HEAD\fR
292272

\fB$ git footers \-\-position\-ref HEAD\fR
refs/heads/main
.fi
.if n \{\
.RE
.\}
.sp
.SH "SEE ALSO"
.sp
\fBgit-number\fR(1)
.SH "CHROMIUM DEPOT_TOOLS"
.sp
Part of the chromium \fBdepot_tools\fR(7) suite\&. These tools are meant to assist with the development of chromium and related projects\&. Download the tools by checking out the \m[blue]\fBgit repository\fR\m[]\&\s-2\u[1]\d\s+2\&.
.SH "NOTES"
.IP " 1." 4
git repository
.RS 4
\%https://chromium.googlesource.com/chromium/tools/depot_tools.git
.RE