2 <html xmlns=
"http://www.w3.org/1999/xhtml" lang=
"en">
4 <meta charset=
"UTF-8"/>
5 <meta http-equiv=
"X-UA-Compatible" content=
"IE=edge"/>
6 <meta name=
"viewport" content=
"width=device-width, initial-scale=1.0"/>
7 <meta name=
"generator" content=
"Asciidoctor 2.0.20"/>
8 <title>Submitting Patches
</title>
9 <link rel=
"stylesheet" href=
"https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700"/>
11 /*! Asciidoctor default stylesheet | MIT License | https://asciidoctor.org */
12 /* Uncomment the following line when using as a custom stylesheet */
13 /* @import
"https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700"; */
14 html{font-family:sans-serif;-webkit-text-size-adjust:
100%}
16 a:focus{outline:thin dotted}
17 a:active,a:hover{outline:
0}
18 h1{font-size:
2em;margin:
.67em
0}
19 b,strong{font-weight:bold}
21 abbr[title]{cursor:help;border-bottom:
1px dotted #dddddf;text-decoration:none}
22 dfn{font-style:italic}
24 mark{background:#ff0;color:#
000}
25 code,kbd,pre,samp{font-family:monospace;font-size:
1em}
26 pre{white-space:pre-wrap}
27 q{quotes:
"\201C" "\201D" "\2018" "\2019"}
29 sub,sup{font-size:
75%;line-height:
0;position:relative;vertical-align:baseline}
33 svg:not(:root){overflow:hidden}
35 audio,video{display:inline-block}
36 audio:not([controls]){display:none;height:
0}
37 fieldset{border:
1px solid silver;margin:
0 2px;padding:
.35em
.625em
.75em}
38 legend{border:
0;padding:
0}
39 button,input,select,textarea{font-family:inherit;font-size:
100%;margin:
0}
40 button,input{line-height:normal}
41 button,select{text-transform:none}
42 button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}
43 button[disabled],html input[disabled]{cursor:default}
44 input[type=checkbox],input[type=radio]{padding:
0}
45 button::-moz-focus-inner,input::-moz-focus-inner{border:
0;padding:
0}
46 textarea{overflow:auto;vertical-align:top}
47 table{border-collapse:collapse;border-spacing:
0}
48 *,::before,::after{box-sizing:border-box}
49 html,body{font-size:
100%}
50 body{background:#fff;color:rgba(
0,
0,
0,
.8);padding:
0;margin:
0;font-family:
"Noto Serif",
"DejaVu Serif",serif;line-height:
1;position:relative;cursor:auto;-moz-tab-size:
4;-o-tab-size:
4;tab-size:
4;word-wrap:anywhere;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}
51 a:hover{cursor:pointer}
52 img,object,embed{max-width:
100%;height:auto}
53 object,embed{height:
100%}
54 img{-ms-interpolation-mode:bicubic}
55 .left{float:left!important}
56 .right{float:right!important}
57 .text-left{text-align:left!important}
58 .text-right{text-align:right!important}
59 .text-center{text-align:center!important}
60 .text-justify{text-align:justify!important}
62 img,object,svg{display:inline-block;vertical-align:middle}
63 textarea{height:auto;min-height:
50px}
65 .subheader,.admonitionblock td.content
>.title,.audioblock
>.title,.exampleblock
>.title,.imageblock
>.title,.listingblock
>.title,.literalblock
>.title,.stemblock
>.title,.openblock
>.title,.paragraph
>.title,.quoteblock
>.title,table.tableblock
>.title,.verseblock
>.title,.videoblock
>.title,.dlist
>.title,.olist
>.title,.ulist
>.title,.qlist
>.title,.hdlist
>.title{line-height:
1.45;color:#
7a2518;font-weight:
400;margin-top:
0;margin-bottom:
.25em}
66 div,dl,dt,dd,ul,ol,li,h1,h2,h3,#toctitle,.sidebarblock
>.content
>.title,h4,h5,h6,pre,form,p,blockquote,th,td{margin:
0;padding:
0}
67 a{color:#
2156a5;text-decoration:underline;line-height:inherit}
68 a:hover,a:focus{color:#
1d4b8f}
70 p{line-height:
1.6;margin-bottom:
1.25em;text-rendering:optimizeLegibility}
71 p aside{font-size:
.875em;line-height:
1.35;font-style:italic}
72 h1,h2,h3,#toctitle,.sidebarblock
>.content
>.title,h4,h5,h6{font-family:
"Open Sans",
"DejaVu Sans",sans-serif;font-weight:
300;font-style:normal;color:#ba3925;text-rendering:optimizeLegibility;margin-top:
1em;margin-bottom:
.5em;line-height:
1.0125em}
73 h1 small,h2 small,h3 small,#toctitle small,.sidebarblock
>.content
>.title small,h4 small,h5 small,h6 small{font-size:
60%;color:#e99b8f;line-height:
0}
75 h2{font-size:
1.6875em}
76 h3,#toctitle,.sidebarblock
>.content
>.title{font-size:
1.375em}
77 h4,h5{font-size:
1.125em}
79 hr{border:solid #dddddf;border-width:
1px
0 0;clear:both;margin:
1.25em
0 1.1875em}
80 em,i{font-style:italic;line-height:inherit}
81 strong,b{font-weight:bold;line-height:inherit}
82 small{font-size:
60%;line-height:inherit}
83 code{font-family:
"Droid Sans Mono",
"DejaVu Sans Mono",monospace;font-weight:
400;color:rgba(
0,
0,
0,
.9)}
84 ul,ol,dl{line-height:
1.6;margin-bottom:
1.25em;list-style-position:outside;font-family:inherit}
85 ul,ol{margin-left:
1.5em}
86 ul li ul,ul li ol{margin-left:
1.25em;margin-bottom:
0}
87 ul.circle{list-style-type:circle}
88 ul.disc{list-style-type:disc}
89 ul.square{list-style-type:square}
90 ul.circle ul:not([class]),ul.disc ul:not([class]),ul.square ul:not([class]){list-style:inherit}
91 ol li ul,ol li ol{margin-left:
1.25em;margin-bottom:
0}
92 dl dt{margin-bottom:
.3125em;font-weight:bold}
93 dl dd{margin-bottom:
1.25em}
94 blockquote{margin:
0 0 1.25em;padding:
.5625em
1.25em
0 1.1875em;border-left:
1px solid #ddd}
95 blockquote,blockquote p{line-height:
1.6;color:rgba(
0,
0,
0,
.85)}
96 @media screen and (min-width:
768px){h1,h2,h3,#toctitle,.sidebarblock
>.content
>.title,h4,h5,h6{line-height:
1.2}
98 h2{font-size:
2.3125em}
99 h3,#toctitle,.sidebarblock
>.content
>.title{font-size:
1.6875em}
100 h4{font-size:
1.4375em}}
101 table{background:#fff;margin-bottom:
1.25em;border:
1px solid #dedede;word-wrap:normal}
102 table thead,table tfoot{background:#f7f8f7}
103 table thead tr th,table thead tr td,table tfoot tr th,table tfoot tr td{padding:
.5em
.625em
.625em;font-size:inherit;color:rgba(
0,
0,
0,
.8);text-align:left}
104 table tr th,table tr td{padding:
.5625em
.625em;font-size:inherit;color:rgba(
0,
0,
0,
.8)}
105 table tr.even,table tr.alt{background:#f8f8f7}
106 table thead tr th,table tfoot tr th,table tbody tr td,table tr td,table tfoot tr td{line-height:
1.6}
107 h1,h2,h3,#toctitle,.sidebarblock
>.content
>.title,h4,h5,h6{line-height:
1.2;word-spacing:-
.05em}
108 h1 strong,h2 strong,h3 strong,#toctitle strong,.sidebarblock
>.content
>.title strong,h4 strong,h5 strong,h6 strong{font-weight:
400}
109 .center{margin-left:auto;margin-right:auto}
111 .clearfix::before,.clearfix::after,.float-group::before,.float-group::after{content:
" ";display:table}
112 .clearfix::after,.float-group::after{clear:both}
113 :not(pre).nobreak{word-wrap:normal}
114 :not(pre).nowrap{white-space:nowrap}
115 :not(pre).pre-wrap{white-space:pre-wrap}
116 :not(pre):not([class^=L])
>code{font-size:
.9375em;font-style:normal!important;letter-spacing:
0;padding:
.1em
.5ex;word-spacing:-
.15em;background:#f7f7f8;border-radius:
4px;line-height:
1.45;text-rendering:optimizeSpeed}
117 pre{color:rgba(
0,
0,
0,
.9);font-family:
"Droid Sans Mono",
"DejaVu Sans Mono",monospace;line-height:
1.45;text-rendering:optimizeSpeed}
118 pre code,pre pre{color:inherit;font-size:inherit;line-height:inherit}
119 pre
>code{display:block}
120 pre.nowrap,pre.nowrap pre{white-space:pre;word-wrap:normal}
121 em em{font-style:normal}
122 strong strong{font-weight:
400}
123 .keyseq{color:rgba(
51,
51,
51,
.8)}
124 kbd{font-family:
"Droid Sans Mono",
"DejaVu Sans Mono",monospace;display:inline-block;color:rgba(
0,
0,
0,
.8);font-size:
.65em;line-height:
1.45;background:#f7f7f7;border:
1px solid #ccc;border-radius:
3px;box-shadow:
0 1px
0 rgba(
0,
0,
0,
.2),inset
0 0 0 .1em #fff;margin:
0 .15em;padding:
.2em
.5em;vertical-align:middle;position:relative;top:-
.1em;white-space:nowrap}
125 .keyseq kbd:first-child{margin-left:
0}
126 .keyseq kbd:last-child{margin-right:
0}
127 .menuseq,.menuref{color:#
000}
128 .menuseq b:not(.caret),.menuref{font-weight:inherit}
129 .menuseq{word-spacing:-
.02em}
130 .menuseq b.caret{font-size:
1.25em;line-height:
.8}
131 .menuseq i.caret{font-weight:bold;text-align:center;width:
.45em}
132 b.button::before,b.button::after{position:relative;top:-
1px;font-weight:
400}
133 b.button::before{content:
"[";padding:
0 3px
0 2px}
134 b.button::after{content:
"]";padding:
0 2px
0 3px}
135 p a
>code:hover{color:rgba(
0,
0,
0,
.9)}
136 #header,#content,#footnotes,#footer{width:
100%;margin:
0 auto;max-width:
62.5em;*zoom:
1;position:relative;padding-left:
.9375em;padding-right:
.9375em}
137 #header::before,#header::after,#content::before,#content::after,#footnotes::before,#footnotes::after,#footer::before,#footer::after{content:
" ";display:table}
138 #header::after,#content::after,#footnotes::after,#footer::after{clear:both}
139 #content{margin-top:
1.25em}
140 #content::before{content:none}
141 #header
>h1:first-child{color:rgba(
0,
0,
0,
.85);margin-top:
2.25rem;margin-bottom:
0}
142 #header
>h1:first-child+#toc{margin-top:
8px;border-top:
1px solid #dddddf}
143 #header
>h1:only-child,body.toc2 #header
>h1:nth-last-child(
2){border-bottom:
1px solid #dddddf;padding-bottom:
8px}
144 #header .details{border-bottom:
1px solid #dddddf;line-height:
1.45;padding-top:
.25em;padding-bottom:
.25em;padding-left:
.25em;color:rgba(
0,
0,
0,
.6);display:flex;flex-flow:row wrap}
145 #header .details span:first-child{margin-left:-
.125em}
146 #header .details span.email a{color:rgba(
0,
0,
0,
.85)}
147 #header .details br{display:none}
148 #header .details br+span::before{content:
"\00a0\2013\00a0"}
149 #header .details br+span.author::before{content:
"\00a0\22c5\00a0";color:rgba(
0,
0,
0,
.85)}
150 #header .details br+span#revremark::before{content:
"\00a0|\00a0"}
151 #header #revnumber{text-transform:capitalize}
152 #header #revnumber::after{content:
"\00a0"}
153 #content
>h1:first-child:not([class]){color:rgba(
0,
0,
0,
.85);border-bottom:
1px solid #dddddf;padding-bottom:
8px;margin-top:
0;padding-top:
1rem;margin-bottom:
1.25rem}
154 #toc{border-bottom:
1px solid #e7e7e9;padding-bottom:
.5em}
155 #toc
>ul{margin-left:
.125em}
156 #toc ul.sectlevel0
>li
>a{font-style:italic}
157 #toc ul.sectlevel0 ul.sectlevel1{margin:
.5em
0}
158 #toc ul{font-family:
"Open Sans",
"DejaVu Sans",sans-serif;list-style-type:none}
159 #toc li{line-height:
1.3334;margin-top:
.3334em}
160 #toc a{text-decoration:none}
161 #toc a:active{text-decoration:underline}
162 #toctitle{color:#
7a2518;font-size:
1.2em}
163 @media screen and (min-width:
768px){#toctitle{font-size:
1.375em}
164 body.toc2{padding-left:
15em;padding-right:
0}
165 #toc.toc2{margin-top:
0!important;background:#f8f8f7;position:fixed;width:
15em;left:
0;top:
0;border-right:
1px solid #e7e7e9;border-top-width:
0!important;border-bottom-width:
0!important;z-index:
1000;padding:
1.25em
1em;height:
100%;overflow:auto}
166 #toc.toc2 #toctitle{margin-top:
0;margin-bottom:
.8rem;font-size:
1.2em}
167 #toc.toc2
>ul{font-size:
.9em;margin-bottom:
0}
168 #toc.toc2 ul ul{margin-left:
0;padding-left:
1em}
169 #toc.toc2 ul.sectlevel0 ul.sectlevel1{padding-left:
0;margin-top:
.5em;margin-bottom:
.5em}
170 body.toc2.toc-right{padding-left:
0;padding-right:
15em}
171 body.toc2.toc-right #toc.toc2{border-right-width:
0;border-left:
1px solid #e7e7e9;left:auto;right:
0}}
172 @media screen and (min-width:
1280px){body.toc2{padding-left:
20em;padding-right:
0}
173 #toc.toc2{width:
20em}
174 #toc.toc2 #toctitle{font-size:
1.375em}
175 #toc.toc2
>ul{font-size:
.95em}
176 #toc.toc2 ul ul{padding-left:
1.25em}
177 body.toc2.toc-right{padding-left:
0;padding-right:
20em}}
178 #content #toc{border:
1px solid #e0e0dc;margin-bottom:
1.25em;padding:
1.25em;background:#f8f8f7;border-radius:
4px}
179 #content #toc
>:first-child{margin-top:
0}
180 #content #toc
>:last-child{margin-bottom:
0}
181 #footer{max-width:none;background:rgba(
0,
0,
0,
.8);padding:
1.25em}
182 #footer-text{color:hsla(
0,
0%,
100%,
.8);line-height:
1.44}
183 #content{margin-bottom:
.625em}
184 .sect1{padding-bottom:
.625em}
185 @media screen and (min-width:
768px){#content{margin-bottom:
1.25em}
186 .sect1{padding-bottom:
1.25em}}
187 .sect1:last-child{padding-bottom:
0}
188 .sect1+.sect1{border-top:
1px solid #e7e7e9}
189 #content h1
>a.anchor,h2
>a.anchor,h3
>a.anchor,#toctitle
>a.anchor,.sidebarblock
>.content
>.title
>a.anchor,h4
>a.anchor,h5
>a.anchor,h6
>a.anchor{position:absolute;z-index:
1001;width:
1.5ex;margin-left:-
1.5ex;display:block;text-decoration:none!important;visibility:hidden;text-align:center;font-weight:
400}
190 #content h1
>a.anchor::before,h2
>a.anchor::before,h3
>a.anchor::before,#toctitle
>a.anchor::before,.sidebarblock
>.content
>.title
>a.anchor::before,h4
>a.anchor::before,h5
>a.anchor::before,h6
>a.anchor::before{content:
"\00A7";font-size:
.85em;display:block;padding-top:
.1em}
191 #content h1:hover
>a.anchor,#content h1
>a.anchor:hover,h2:hover
>a.anchor,h2
>a.anchor:hover,h3:hover
>a.anchor,#toctitle:hover
>a.anchor,.sidebarblock
>.content
>.title:hover
>a.anchor,h3
>a.anchor:hover,#toctitle
>a.anchor:hover,.sidebarblock
>.content
>.title
>a.anchor:hover,h4:hover
>a.anchor,h4
>a.anchor:hover,h5:hover
>a.anchor,h5
>a.anchor:hover,h6:hover
>a.anchor,h6
>a.anchor:hover{visibility:visible}
192 #content h1
>a.link,h2
>a.link,h3
>a.link,#toctitle
>a.link,.sidebarblock
>.content
>.title
>a.link,h4
>a.link,h5
>a.link,h6
>a.link{color:#ba3925;text-decoration:none}
193 #content h1
>a.link:hover,h2
>a.link:hover,h3
>a.link:hover,#toctitle
>a.link:hover,.sidebarblock
>.content
>.title
>a.link:hover,h4
>a.link:hover,h5
>a.link:hover,h6
>a.link:hover{color:#a53221}
194 details,.audioblock,.imageblock,.literalblock,.listingblock,.stemblock,.videoblock{margin-bottom:
1.25em}
195 details{margin-left:
1.25rem}
196 details
>summary{cursor:pointer;display:block;position:relative;line-height:
1.6;margin-bottom:
.625rem;outline:none;-webkit-tap-highlight-color:transparent}
197 details
>summary::-webkit-details-marker{display:none}
198 details
>summary::before{content:
"";border:solid transparent;border-left:solid;border-width:
.3em
0 .3em
.5em;position:absolute;top:
.5em;left:-
1.25rem;transform:translateX(
15%)}
199 details[open]
>summary::before{border:solid transparent;border-top:solid;border-width:
.5em
.3em
0;transform:translateY(
15%)}
200 details
>summary::after{content:
"";width:
1.25rem;height:
1em;position:absolute;top:
.3em;left:-
1.25rem}
201 .admonitionblock td.content
>.title,.audioblock
>.title,.exampleblock
>.title,.imageblock
>.title,.listingblock
>.title,.literalblock
>.title,.stemblock
>.title,.openblock
>.title,.paragraph
>.title,.quoteblock
>.title,table.tableblock
>.title,.verseblock
>.title,.videoblock
>.title,.dlist
>.title,.olist
>.title,.ulist
>.title,.qlist
>.title,.hdlist
>.title{text-rendering:optimizeLegibility;text-align:left;font-family:
"Noto Serif",
"DejaVu Serif",serif;font-size:
1rem;font-style:italic}
202 table.tableblock.fit-content
>caption.title{white-space:nowrap;width:
0}
203 .paragraph.lead
>p,#preamble
>.sectionbody
>[class=paragraph]:first-of-type p{font-size:
1.21875em;line-height:
1.6;color:rgba(
0,
0,
0,
.85)}
204 .admonitionblock
>table{border-collapse:separate;border:
0;background:none;width:
100%}
205 .admonitionblock
>table td.icon{text-align:center;width:
80px}
206 .admonitionblock
>table td.icon img{max-width:none}
207 .admonitionblock
>table td.icon .title{font-weight:bold;font-family:
"Open Sans",
"DejaVu Sans",sans-serif;text-transform:uppercase}
208 .admonitionblock
>table td.content{padding-left:
1.125em;padding-right:
1.25em;border-left:
1px solid #dddddf;color:rgba(
0,
0,
0,
.6);word-wrap:anywhere}
209 .admonitionblock
>table td.content
>:last-child
>:last-child{margin-bottom:
0}
210 .exampleblock
>.content{border:
1px solid #e6e6e6;margin-bottom:
1.25em;padding:
1.25em;background:#fff;border-radius:
4px}
211 .sidebarblock{border:
1px solid #dbdbd6;margin-bottom:
1.25em;padding:
1.25em;background:#f3f3f2;border-radius:
4px}
212 .sidebarblock
>.content
>.title{color:#
7a2518;margin-top:
0;text-align:center}
213 .exampleblock
>.content
>:first-child,.sidebarblock
>.content
>:first-child{margin-top:
0}
214 .exampleblock
>.content
>:last-child,.exampleblock
>.content
>:last-child
>:last-child,.exampleblock
>.content .olist
>ol
>li:last-child
>:last-child,.exampleblock
>.content .ulist
>ul
>li:last-child
>:last-child,.exampleblock
>.content .qlist
>ol
>li:last-child
>:last-child,.sidebarblock
>.content
>:last-child,.sidebarblock
>.content
>:last-child
>:last-child,.sidebarblock
>.content .olist
>ol
>li:last-child
>:last-child,.sidebarblock
>.content .ulist
>ul
>li:last-child
>:last-child,.sidebarblock
>.content .qlist
>ol
>li:last-child
>:last-child{margin-bottom:
0}
215 .literalblock pre,.listingblock
>.content
>pre{border-radius:
4px;overflow-x:auto;padding:
1em;font-size:
.8125em}
216 @media screen and (min-width:
768px){.literalblock pre,.listingblock
>.content
>pre{font-size:
.90625em}}
217 @media screen and (min-width:
1280px){.literalblock pre,.listingblock
>.content
>pre{font-size:
1em}}
218 .literalblock pre,.listingblock
>.content
>pre:not(.highlight),.listingblock
>.content
>pre[class=highlight],.listingblock
>.content
>pre[class^=
"highlight "]{background:#f7f7f8}
219 .literalblock.output pre{color:#f7f7f8;background:rgba(
0,
0,
0,
.9)}
220 .listingblock
>.content{position:relative}
221 .listingblock code[data-lang]::before{display:none;content:attr(data-lang);position:absolute;font-size:
.75em;top:
.425rem;right:
.5rem;line-height:
1;text-transform:uppercase;color:inherit;opacity:
.5}
222 .listingblock:hover code[data-lang]::before{display:block}
223 .listingblock.terminal pre .command::before{content:attr(data-prompt);padding-right:
.5em;color:inherit;opacity:
.5}
224 .listingblock.terminal pre .command:not([data-prompt])::before{content:
"$"}
225 .listingblock pre.highlightjs{padding:
0}
226 .listingblock pre.highlightjs
>code{padding:
1em;border-radius:
4px}
227 .listingblock pre.prettyprint{border-width:
0}
228 .prettyprint{background:#f7f7f8}
229 pre.prettyprint .linenums{line-height:
1.45;margin-left:
2em}
230 pre.prettyprint li{background:none;list-style-type:inherit;padding-left:
0}
231 pre.prettyprint li code[data-lang]::before{opacity:
1}
232 pre.prettyprint li:not(:first-child) code[data-lang]::before{display:none}
233 table.linenotable{border-collapse:separate;border:
0;margin-bottom:
0;background:none}
234 table.linenotable td[class]{color:inherit;vertical-align:top;padding:
0;line-height:inherit;white-space:normal}
235 table.linenotable td.code{padding-left:
.75em}
236 table.linenotable td.linenos,pre.pygments .linenos{border-right:
1px solid;opacity:
.35;padding-right:
.5em;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}
237 pre.pygments span.linenos{display:inline-block;margin-right:
.75em}
238 .quoteblock{margin:
0 1em
1.25em
1.5em;display:table}
239 .quoteblock:not(.excerpt)
>.title{margin-left:-
1.5em;margin-bottom:
.75em}
240 .quoteblock blockquote,.quoteblock p{color:rgba(
0,
0,
0,
.85);font-size:
1.15rem;line-height:
1.75;word-spacing:
.1em;letter-spacing:
0;font-style:italic;text-align:justify}
241 .quoteblock blockquote{margin:
0;padding:
0;border:
0}
242 .quoteblock blockquote::before{content:
"\201c";float:left;font-size:
2.75em;font-weight:bold;line-height:
.6em;margin-left:-
.6em;color:#
7a2518;text-shadow:
0 1px
2px rgba(
0,
0,
0,
.1)}
243 .quoteblock blockquote
>.paragraph:last-child p{margin-bottom:
0}
244 .quoteblock .attribution{margin-top:
.75em;margin-right:
.5ex;text-align:right}
245 .verseblock{margin:
0 1em
1.25em}
246 .verseblock pre{font-family:
"Open Sans",
"DejaVu Sans",sans-serif;font-size:
1.15rem;color:rgba(
0,
0,
0,
.85);font-weight:
300;text-rendering:optimizeLegibility}
247 .verseblock pre strong{font-weight:
400}
248 .verseblock .attribution{margin-top:
1.25rem;margin-left:
.5ex}
249 .quoteblock .attribution,.verseblock .attribution{font-size:
.9375em;line-height:
1.45;font-style:italic}
250 .quoteblock .attribution br,.verseblock .attribution br{display:none}
251 .quoteblock .attribution cite,.verseblock .attribution cite{display:block;letter-spacing:-
.025em;color:rgba(
0,
0,
0,
.6)}
252 .quoteblock.abstract blockquote::before,.quoteblock.excerpt blockquote::before,.quoteblock .quoteblock blockquote::before{display:none}
253 .quoteblock.abstract blockquote,.quoteblock.abstract p,.quoteblock.excerpt blockquote,.quoteblock.excerpt p,.quoteblock .quoteblock blockquote,.quoteblock .quoteblock p{line-height:
1.6;word-spacing:
0}
254 .quoteblock.abstract{margin:
0 1em
1.25em;display:block}
255 .quoteblock.abstract
>.title{margin:
0 0 .375em;font-size:
1.15em;text-align:center}
256 .quoteblock.excerpt
>blockquote,.quoteblock .quoteblock{padding:
0 0 .25em
1em;border-left:
.25em solid #dddddf}
257 .quoteblock.excerpt,.quoteblock .quoteblock{margin-left:
0}
258 .quoteblock.excerpt blockquote,.quoteblock.excerpt p,.quoteblock .quoteblock blockquote,.quoteblock .quoteblock p{color:inherit;font-size:
1.0625rem}
259 .quoteblock.excerpt .attribution,.quoteblock .quoteblock .attribution{color:inherit;font-size:
.85rem;text-align:left;margin-right:
0}
260 p.tableblock:last-child{margin-bottom:
0}
261 td.tableblock
>.content{margin-bottom:
1.25em;word-wrap:anywhere}
262 td.tableblock
>.content
>:last-child{margin-bottom:-
1.25em}
263 table.tableblock,th.tableblock,td.tableblock{border:
0 solid #dedede}
264 table.grid-all
>*
>tr
>*{border-width:
1px}
265 table.grid-cols
>*
>tr
>*{border-width:
0 1px}
266 table.grid-rows
>*
>tr
>*{border-width:
1px
0}
267 table.frame-all{border-width:
1px}
268 table.frame-ends{border-width:
1px
0}
269 table.frame-sides{border-width:
0 1px}
270 table.frame-none
>colgroup+*
>:first-child
>*,table.frame-sides
>colgroup+*
>:first-child
>*{border-top-width:
0}
271 table.frame-none
>:last-child
>:last-child
>*,table.frame-sides
>:last-child
>:last-child
>*{border-bottom-width:
0}
272 table.frame-none
>*
>tr
>:first-child,table.frame-ends
>*
>tr
>:first-child{border-left-width:
0}
273 table.frame-none
>*
>tr
>:last-child,table.frame-ends
>*
>tr
>:last-child{border-right-width:
0}
274 table.stripes-all
>*
>tr,table.stripes-odd
>*
>tr:nth-of-type(odd),table.stripes-even
>*
>tr:nth-of-type(even),table.stripes-hover
>*
>tr:hover{background:#f8f8f7}
275 th.halign-left,td.halign-left{text-align:left}
276 th.halign-right,td.halign-right{text-align:right}
277 th.halign-center,td.halign-center{text-align:center}
278 th.valign-top,td.valign-top{vertical-align:top}
279 th.valign-bottom,td.valign-bottom{vertical-align:bottom}
280 th.valign-middle,td.valign-middle{vertical-align:middle}
281 table thead th,table tfoot th{font-weight:bold}
282 tbody tr th{background:#f7f8f7}
283 tbody tr th,tbody tr th p,tfoot tr th,tfoot tr th p{color:rgba(
0,
0,
0,
.8);font-weight:bold}
284 p.tableblock
>code:only-child{background:none;padding:
0}
285 p.tableblock{font-size:
1em}
286 ol{margin-left:
1.75em}
287 ul li ol{margin-left:
1.5em}
288 dl dd{margin-left:
1.125em}
289 dl dd:last-child,dl dd:last-child
>:last-child{margin-bottom:
0}
290 li p,ul dd,ol dd,.olist .olist,.ulist .ulist,.ulist .olist,.olist .ulist{margin-bottom:
.625em}
291 ul.checklist,ul.none,ol.none,ul.no-bullet,ol.no-bullet,ol.unnumbered,ul.unstyled,ol.unstyled{list-style-type:none}
292 ul.no-bullet,ol.no-bullet,ol.unnumbered{margin-left:
.625em}
293 ul.unstyled,ol.unstyled{margin-left:
0}
294 li
>p:empty:only-child::before{content:
"";display:inline-block}
295 ul.checklist
>li
>p:first-child{margin-left:-
1em}
296 ul.checklist
>li
>p:first-child
>.fa-square-o:first-child,ul.checklist
>li
>p:first-child
>.fa-check-square-o:first-child{width:
1.25em;font-size:
.8em;position:relative;bottom:
.125em}
297 ul.checklist
>li
>p:first-child
>input[type=checkbox]:first-child{margin-right:
.25em}
298 ul.inline{display:flex;flex-flow:row wrap;list-style:none;margin:
0 0 .625em -
1.25em}
299 ul.inline
>li{margin-left:
1.25em}
300 .unstyled dl dt{font-weight:
400;font-style:normal}
301 ol.arabic{list-style-type:decimal}
302 ol.decimal{list-style-type:decimal-leading-zero}
303 ol.loweralpha{list-style-type:lower-alpha}
304 ol.upperalpha{list-style-type:upper-alpha}
305 ol.lowerroman{list-style-type:lower-roman}
306 ol.upperroman{list-style-type:upper-roman}
307 ol.lowergreek{list-style-type:lower-greek}
308 .hdlist
>table,.colist
>table{border:
0;background:none}
309 .hdlist
>table
>tbody
>tr,.colist
>table
>tbody
>tr{background:none}
310 td.hdlist1,td.hdlist2{vertical-align:top;padding:
0 .625em}
311 td.hdlist1{font-weight:bold;padding-bottom:
1.25em}
312 td.hdlist2{word-wrap:anywhere}
313 .literalblock+.colist,.listingblock+.colist{margin-top:-
.5em}
314 .colist td:not([class]):first-child{padding:
.4em
.75em
0;line-height:
1;vertical-align:top}
315 .colist td:not([class]):first-child img{max-width:none}
316 .colist td:not([class]):last-child{padding:
.25em
0}
317 .thumb,.th{line-height:
0;display:inline-block;border:
4px solid #fff;box-shadow:
0 0 0 1px #ddd}
318 .imageblock.left{margin:
.25em
.625em
1.25em
0}
319 .imageblock.right{margin:
.25em
0 1.25em
.625em}
320 .imageblock
>.title{margin-bottom:
0}
321 .imageblock.thumb,.imageblock.th{border-width:
6px}
322 .imageblock.thumb
>.title,.imageblock.th
>.title{padding:
0 .125em}
323 .image.left,.image.right{margin-top:
.25em;margin-bottom:
.25em;display:inline-block;line-height:
0}
324 .image.left{margin-right:
.625em}
325 .image.right{margin-left:
.625em}
326 a.image{text-decoration:none;display:inline-block}
327 a.image object{pointer-events:none}
328 sup.footnote,sup.footnoteref{font-size:
.875em;position:static;vertical-align:super}
329 sup.footnote a,sup.footnoteref a{text-decoration:none}
330 sup.footnote a:active,sup.footnoteref a:active{text-decoration:underline}
331 #footnotes{padding-top:
.75em;padding-bottom:
.75em;margin-bottom:
.625em}
332 #footnotes hr{width:
20%;min-width:
6.25em;margin:-
.25em
0 .75em;border-width:
1px
0 0}
333 #footnotes .footnote{padding:
0 .375em
0 .225em;line-height:
1.3334;font-size:
.875em;margin-left:
1.2em;margin-bottom:
.2em}
334 #footnotes .footnote a:first-of-type{font-weight:bold;text-decoration:none;margin-left:-
1.05em}
335 #footnotes .footnote:last-of-type{margin-bottom:
0}
336 #content #footnotes{margin-top:-
.625em;margin-bottom:
0;padding:
.75em
0}
337 div.unbreakable{page-break-inside:avoid}
338 .big{font-size:larger}
339 .small{font-size:smaller}
340 .underline{text-decoration:underline}
341 .overline{text-decoration:overline}
342 .line-through{text-decoration:line-through}
344 .aqua-background{background:#
00fafa}
346 .black-background{background:#
000}
348 .blue-background{background:#
0000fa}
349 .fuchsia{color:#bf00bf}
350 .fuchsia-background{background:#fa00fa}
352 .gray-background{background:#
7d7d7d}
353 .green{color:#
006000}
354 .green-background{background:#
007d00}
356 .lime-background{background:#
00fa00}
357 .maroon{color:#
600000}
358 .maroon-background{background:#
7d0000}
360 .navy-background{background:#
00007d}
361 .olive{color:#
606000}
362 .olive-background{background:#
7d7d00}
363 .purple{color:#
600060}
364 .purple-background{background:#
7d007d}
366 .red-background{background:#fa0000}
367 .silver{color:#
909090}
368 .silver-background{background:#bcbcbc}
370 .teal-background{background:#
007d7d}
371 .white{color:#bfbfbf}
372 .white-background{background:#fafafa}
373 .yellow{color:#bfbf00}
374 .yellow-background{background:#fafa00}
375 span.icon
>.fa{cursor:default}
376 a span.icon
>.fa{cursor:inherit}
377 .admonitionblock td.icon [class^=
"fa icon-"]{font-size:
2.5em;text-shadow:
1px
1px
2px rgba(
0,
0,
0,
.5);cursor:default}
378 .admonitionblock td.icon .icon-note::before{content:
"\f05a";color:#
19407c}
379 .admonitionblock td.icon .icon-tip::before{content:
"\f0eb";text-shadow:
1px
1px
2px rgba(
155,
155,
0,
.8);color:#
111}
380 .admonitionblock td.icon .icon-warning::before{content:
"\f071";color:#bf6900}
381 .admonitionblock td.icon .icon-caution::before{content:
"\f06d";color:#bf3400}
382 .admonitionblock td.icon .icon-important::before{content:
"\f06a";color:#bf0000}
383 .conum[data-value]{display:inline-block;color:#fff!important;background:rgba(
0,
0,
0,
.8);border-radius:
50%;text-align:center;font-size:
.75em;width:
1.67em;height:
1.67em;line-height:
1.67em;font-family:
"Open Sans",
"DejaVu Sans",sans-serif;font-style:normal;font-weight:bold}
384 .conum[data-value] *{color:#fff!important}
385 .conum[data-value]+b{display:none}
386 .conum[data-value]::after{content:attr(data-value)}
387 pre .conum[data-value]{position:relative;top:-
.125em}
388 b.conum *{color:inherit!important}
389 .conum:not([data-value]):empty{display:none}
390 dt,th.tableblock,td.content,div.footnote{text-rendering:optimizeLegibility}
391 h1,h2,p,td.content,span.alt,summary{letter-spacing:-
.01em}
392 p strong,td.content strong,div.footnote strong{letter-spacing:-
.005em}
393 p,blockquote,dt,td.content,td.hdlist1,span.alt,summary{font-size:
1.0625rem}
394 p{margin-bottom:
1.25rem}
395 .sidebarblock p,.sidebarblock dt,.sidebarblock td.content,p.tableblock{font-size:
1em}
396 .exampleblock
>.content{background:#fffef7;border-color:#e0e0dc;box-shadow:
0 1px
4px #e0e0dc}
397 .print-only{display:none!important}
398 @page{margin:
1.25cm
.75cm}
399 @media print{*{box-shadow:none!important;text-shadow:none!important}
401 a{color:inherit!important;text-decoration:underline!important}
402 a.bare,a[href^=
"#"],a[href^=
"mailto:"]{text-decoration:none!important}
403 a[href^=
"http:"]:not(.bare)::after,a[href^=
"https:"]:not(.bare)::after{content:
"(" attr(href)
")";display:inline-block;font-size:
.875em;padding-left:
.25em}
404 abbr[title]{border-bottom:
1px dotted}
405 abbr[title]::after{content:
" (" attr(title)
")"}
406 pre,blockquote,tr,img,object,svg{page-break-inside:avoid}
407 thead{display:table-header-group}
409 p,blockquote,dt,td.content{font-size:
1em;orphans:
3;widows:
3}
410 h2,h3,#toctitle,.sidebarblock
>.content
>.title{page-break-after:avoid}
411 #header,#content,#footnotes,#footer{max-width:none}
412 #toc,.sidebarblock,.exampleblock
>.content{background:none!important}
413 #toc{border-bottom:
1px solid #dddddf!important;padding-bottom:
0!important}
414 body.book #header{text-align:center}
415 body.book #header
>h1:first-child{border:
0!important;margin:
2.5em
0 1em}
416 body.book #header .details{border:
0!important;display:block;padding:
0!important}
417 body.book #header .details span:first-child{margin-left:
0!important}
418 body.book #header .details br{display:block}
419 body.book #header .details br+span::before{content:none!important}
420 body.book #toc{border:
0!important;text-align:left!important;padding:
0!important;margin:
0!important}
421 body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1
>h2{page-break-before:always}
422 .listingblock code[data-lang]::before{display:block}
423 #footer{padding:
0 .9375em}
424 .hide-on-print{display:none!important}
425 .print-only{display:block!important}
426 .hide-for-print{display:none!important}
427 .show-for-print{display:inherit!important}}
428 @media amzn-kf8,print{#header
>h1:first-child{margin-top:
1.25rem}
429 .sect1{padding:
0!important}
430 .sect1+.sect1{border:
0}
431 #footer{background:none}
432 #footer-text{color:rgba(
0,
0,
0,
.6);font-size:
.9em}}
433 @media amzn-kf8{#header,#content,#footnotes,#footer{padding:
0}}
441 <body class=
"article">
443 <h1>Submitting Patches
</h1>
447 <h2 id=
"_guidelines">Guidelines
</h2>
448 <div class=
"sectionbody">
449 <div class=
"paragraph">
450 <p>Here are some guidelines for contributing back to this
451 project. There is also a
<a href=
"MyFirstContribution.html">step-by-step tutorial
</a>
452 available which covers many of these same guidelines.
</p>
455 <h3 id=
"patch-flow">A typical life cycle of a patch series
</h3>
456 <div class=
"paragraph">
457 <p>To help us understand the reason behind various guidelines given later
458 in the document, first let
’s understand how the life cycle of a
459 typical patch series for this project goes.
</p>
461 <div class=
"olist arabic">
464 <p>You come up with an itch. You code it up. You do not need any
465 pre-authorization from the project to do so.
</p>
466 <div class=
"paragraph">
467 <p>Your patches will be reviewed by other contributors on the mailing
468 list, and the reviews will be done to assess the merit of various
469 things, like the general idea behind your patch (including
"is it
470 solving a problem worth solving in the first place?"), the reason
471 behind the design of the solution, and the actual implementation.
472 The guidelines given here are there to help your patches by making
473 them easier to understand by the reviewers.
</p>
477 <p>You send the patches to the list and cc people who may need to know
478 about the change. Your goal is
<strong>not
</strong> necessarily to convince others
479 that what you are building is good. Your goal is to get help in
480 coming up with a solution for the
"itch" that is better than what
481 you can build alone.
</p>
482 <div class=
"paragraph">
483 <p>The people who may need to know are the ones who worked on the code
484 you are touching. These people happen to be the ones who are
485 most likely to be knowledgeable enough to help you, but
486 they have no obligation to help you (i.e. you ask them for help,
487 you don
’t demand).
<code>git
</code> <code>log
</code> <code>-p
</code> -- <code><em>$area_you_are_modifying
</em></code> would
488 help you find out who they are.
</p>
492 <p>You get comments and suggestions for improvements. You may even get
493 them in an
"on top of your change" patch form. You are expected to
494 respond to them with
"Reply-All" on the mailing list, while taking
495 them into account while preparing an updated set of patches.
</p>
498 <p>Polish, refine, and re-send your patches to the list and to the people
499 who spent their time to improve your patch. Go back to step (
2).
</p>
502 <p>While the above iterations improve your patches, the maintainer may
503 pick the patches up from the list and queue them to the
<code>seen
</code>
504 branch, in order to make it easier for people to play with it
505 without having to pick up and apply the patches to their trees
506 themselves. Being in
<code>seen
</code> has no other meaning. Specifically, it
507 does not mean the patch was
"accepted" in any way.
</p>
510 <p>When the discussion reaches a consensus that the latest iteration of
511 the patches are in good enough shape, the maintainer includes the
512 topic in the
"What’s cooking" report that are sent out a few times a
513 week to the mailing list, marked as
"Will merge to <em>next</em>." This
514 decision is primarily made by the maintainer with help from those
515 who participated in the review discussion.
</p>
518 <p>After the patches are merged to the
<em>next
</em> branch, the discussion
519 can still continue to further improve them by adding more patches on
520 top, but by the time a topic gets merged to
<em>next
</em>, it is expected
521 that everybody agrees that the scope and the basic direction of the
522 topic are appropriate, so such an incremental updates are limited to
523 small corrections and polishing. After a topic cooks for some time
524 (like
7 calendar days) in
<em>next
</em> without needing further tweaks on
525 top, it gets merged to the
<em>master
</em> branch and wait to become part
526 of the next major release.
</p>
530 <div class=
"paragraph">
531 <p>In the following sections, many techniques and conventions are listed
532 to help your patches get reviewed effectively in such a life cycle.
</p>
536 <h3 id=
"choose-starting-point">Choose a starting point.
</h3>
537 <div class=
"paragraph">
538 <p>As a preliminary step, you must first choose a starting point for your
539 work. Typically this means choosing a branch, although technically
540 speaking it is actually a particular commit (typically the HEAD, or tip,
543 <div class=
"paragraph">
544 <p>There are several important branches to be aware of. Namely, there are
545 four integration branches as discussed in
<a href=
"gitworkflows.html">gitworkflows(
7)
</a>:
</p>
563 <div class=
"paragraph">
564 <p>The branches lower on the list are typically descendants of the ones
565 that come before it. For example,
<code>maint
</code> is an
"older" branch than
566 <code>master
</code> because
<code>master
</code> usually has patches (commits) on top of
567 <code>maint
</code>.
</p>
569 <div class=
"paragraph">
570 <p>There are also
"topic" branches, which contain work from other
571 contributors. Topic branches are created by the Git maintainer (in
572 their fork) to organize the current set of incoming contributions on
573 the mailing list, and are itemized in the regular
"What’s cooking in
574 git.git" announcements. To find the tip of a topic branch, run
<code>git
</code> <code>log
</code>
575 <code>--first-parent
</code> <code>master
</code><code>..
</code><code>seen
</code> and look for the merge commit. The second
576 parent of this commit is the tip of the topic branch.
</p>
578 <div class=
"paragraph">
579 <p>There is one guiding principle for choosing the right starting point: in
580 general, always base your work on the oldest integration branch that
581 your change is relevant to (see
"Merge upwards" in
582 <a href=
"gitworkflows.html">gitworkflows(
7)
</a>). What this principle means is that for the
583 vast majority of cases, the starting point for new work should be the
584 latest HEAD commit of
<code>maint
</code> or
<code>master
</code> based on the following cases:
</p>
589 <p>If you are fixing bugs in the released version, use
<code>maint
</code> as the
590 starting point (which may mean you have to fix things without using
591 new API features on the cutting edge that recently appeared in
592 <code>master
</code> but were not available in the released version).
</p>
595 <p>Otherwise (such as if you are adding new features) use
<code>master
</code>.
</p>
599 <div class=
"admonitionblock note">
603 <div class=
"title">Note
</div>
606 In exceptional cases, a bug that was introduced in an old
607 version may have to be fixed for users of releases that are much older
608 than the recent releases.
<code>git
</code> <code>describe
</code> <code>--contains
</code> <code>X
</code> may describe
609 <code>X
</code> as
<code>v2.30
.0-rc2-gXXXXXX
</code> for the commit
<code>X
</code> that introduced the
610 bug, and the bug may be so high-impact that we may need to issue a new
611 maintenance release for Git
2.30.x series, when
"Git 2.41.0" is the
612 current release. In such a case, you may want to use the tip of the
613 maintenance branch for the
2.30.x series, which may be available in the
614 <code>maint-
2.30</code> branch in
<a href=
"https://github.com/gitster/git">the maintainer
’s
615 "broken out" repo
</a>.
620 <div class=
"paragraph">
621 <p>This also means that
<code>next
</code> or
<code>seen
</code> are inappropriate starting points
622 for your work, if you want your work to have a realistic chance of
623 graduating to
<code>master
</code>. They are simply not designed to be used as a
624 base for new work; they are only there to make sure that topics in
625 flight work well together. This is why both
<code>next
</code> and
<code>seen
</code> are
626 frequently re-integrated with incoming patches on the mailing list and
627 force-pushed to replace previous versions of themselves. A topic that is
628 literally built on top of
<code>next
</code> cannot be merged to
<code>master
</code> without
629 dragging in all the other topics in
<code>next
</code>, some of which may not be
632 <div class=
"paragraph">
633 <p>For example, if you are making tree-wide changes, while somebody else is
634 also making their own tree-wide changes, your work may have severe
635 overlap with the other person
’s work. This situation may tempt you to
636 use
<code>next
</code> as your starting point (because it would have the other
637 person
’s work included in it), but doing so would mean you
’ll not only
638 depend on the other person
’s work, but all the other random things from
639 other contributors that are already integrated into
<code>next
</code>. And as soon
640 as
<code>next
</code> is updated with a new version, all of your work will need to
641 be rebased anyway in order for them to be cleanly applied by the
644 <div class=
"paragraph">
645 <p>Under truly exceptional circumstances where you absolutely must depend
646 on a select few topic branches that are already in
<code>next
</code> but not in
647 <code>master
</code>, you may want to create your own custom base-branch by forking
648 <code>master
</code> and merging the required topic branches into it. You could then
649 work on top of this base-branch. But keep in mind that this base-branch
650 would only be known privately to you. So when you are ready to send
651 your patches to the list, be sure to communicate how you created it in
652 your cover letter. This critical piece of information would allow
653 others to recreate your base-branch on their end in order for them to
654 try out your work.
</p>
656 <div class=
"paragraph">
657 <p>Finally, note that some parts of the system have dedicated maintainers
658 with their own separate source code repositories (see the section
659 "Subsystems" below).
</p>
663 <h3 id=
"separate-commits">Make separate commits for logically separate changes.
</h3>
664 <div class=
"paragraph">
665 <p>Unless your patch is really trivial, you should not be sending
666 out a patch that was generated between your working tree and
667 your commit head. Instead, always make a commit with complete
668 commit message and generate a series of patches from your
669 repository. It is a good discipline.
</p>
671 <div class=
"paragraph">
672 <p>Give an explanation for the change(s) that is detailed enough so
673 that people can judge if it is good thing to do, without reading
674 the actual patch text to determine how well the code does what
675 the explanation promises to do.
</p>
677 <div class=
"paragraph">
678 <p>If your description starts to get too long, that
’s a sign that you
679 probably need to split up your commit to finer grained pieces.
680 That being said, patches which plainly describe the things that
681 help reviewers check the patch, and future maintainers understand
682 the code, are the most beautiful patches. Descriptions that summarize
683 the point in the subject well, and describe the motivation for the
684 change, the approach taken by the change, and if relevant how this
685 differs substantially from the prior version, are all good things
688 <div class=
"paragraph">
689 <p>Make sure that you have tests for the bug you are fixing. See
690 <code>t/README
</code> for guidance.
</p>
692 <div id=
"tests" class=
"paragraph">
693 <p>When adding a new feature, make sure that you have new tests to show
694 the feature triggers the new behavior when it should, and to show the
695 feature does not trigger when it shouldn
’t. After any code change,
696 make sure that the entire test suite passes. When fixing a bug, make
697 sure you have new tests that break if somebody else breaks what you
698 fixed by accident to avoid regression. Also, try merging your work to
699 <em>next
</em> and
<em>seen
</em> and make sure the tests still pass; topics by others
700 that are still in flight may have unexpected interactions with what
701 you are trying to do in your topic.
</p>
703 <div class=
"paragraph">
704 <p>Pushing to a fork of
<a href=
"https://github.com/git/git" class=
"bare">https://github.com/git/git
</a> will use their CI
705 integration to test your changes on Linux, Mac and Windows. See the
706 <a href=
"#GHCI">GitHub CI
</a> section for details.
</p>
708 <div class=
"paragraph">
709 <p>Do not forget to update the documentation to describe the updated
710 behavior and make sure that the resulting documentation set formats
711 well (try the Documentation/doc-diff script).
</p>
713 <div class=
"paragraph">
714 <p>We currently have a liberal mixture of US and UK English norms for
715 spelling and grammar, which is somewhat unfortunate. A huge patch that
716 touches the files all over the place only to correct the inconsistency
717 is not welcome, though. Potential clashes with other changes that can
718 result from such a patch are not worth it. We prefer to gradually
719 reconcile the inconsistencies in favor of US English, with small and
720 easily digestible patches, as a side effect of doing some other real
721 work in the vicinity (e.g. rewriting a paragraph for clarity, while
722 turning en_UK spelling to en_US). Obvious typographical fixes are much
723 more welcomed (
"teh → "the
"), preferably submitted as independent
724 patches separate from other documentation changes.</p>
726 <div id="whitespace-check
" class="paragraph
">
727 <p>Oh, another thing. We are picky about whitespaces. Make sure your
728 changes do not trigger errors with the sample pre-commit hook shipped
729 in <code>templates/hooks--pre-commit</code>. To help ensure this does not happen,
730 run <code>git</code> <code>diff</code> <code>--check</code> on your changes before you commit.</p>
734 <h3 id="describe-changes
">Describe your changes well.</h3>
735 <div class="paragraph
">
736 <p>The log message that explains your changes is just as important as the
737 changes themselves. Your code may be clearly written with in-code
738 comment to sufficiently explain how it works with the surrounding
739 code, but those who need to fix or enhance your code in the future
740 will need to know <em>why</em> your code does what it does, for a few
743 <div class="olist arabic
">
746 <p>Your code may be doing something differently from what you wanted it
747 to do. Writing down what you actually wanted to achieve will help
748 them fix your code and make it do what it should have been doing
749 (also, you often discover your own bugs yourself, while writing the
750 log message to summarize the thought behind it).</p>
753 <p>Your code may be doing things that were only necessary for your
754 immediate needs (e.g. "do X to directories
" without implementing or
755 even designing what is to be done on files). Writing down why you
756 excluded what the code does not do will help guide future developers.
757 Writing down "we do X to directories, because directories have
758 characteristic Y
" would help them infer "oh, files also have the same
759 characteristic Y, so perhaps doing X to them would also make sense?
".
760 Saying "we don
’t do the same X to files, because
…​" will help them
761 decide if the reasoning is sound (in which case they do not waste
762 time extending your code to cover files), or reason differently (in
763 which case, they can explain why they extend your code to cover
768 <div class="paragraph
">
769 <p>The goal of your log message is to convey the <em>why</em> behind your change
770 to help future developers. The reviewers will also make sure that
771 your proposed log message will serve this purpose well.</p>
773 <div class="paragraph
">
774 <p>The first line of the commit message should be a short description (50
775 characters is the soft limit, see DISCUSSION in <a href="git-commit.html
">git-commit(1)</a>),
776 and should skip the full stop. It is also conventional in most cases to
777 prefix the first line with "area:
" where the area is a filename or
778 identifier for the general area of the code being modified, e.g.</p>
783 <p>doc: clarify distinction between sign-off and pgp-signing</p>
786 <p>githooks.txt: improve the intro section</p>
790 <div class="paragraph
">
791 <p>If in doubt which identifier to use, run <code>git</code> <code>log</code> <code>--no-merges</code> on the
792 files you are modifying to see the current conventions.</p>
794 <div id="summary-section
" class="paragraph
">
795 <p>The title sentence after the "area:
" prefix omits the full stop at the
796 end, and its first word is not capitalized (the omission
797 of capitalization applies only to the word after the "area:
"
798 prefix of the title) unless there is a reason to
799 capitalize it other than because it is the first word in the sentence.
800 E.g. "doc: clarify
…​", not "doc: Clarify
…​", or "githooks.txt:
801 improve
…​", not "githooks.txt: Improve
…​". But "refs: HEAD is also
802 treated as a ref
" is correct, as we spell <code>HEAD</code> in all caps even when
803 it appears in the middle of a sentence.</p>
805 <div id="meaningful-message
" class="paragraph
">
806 <p>The body should provide a meaningful commit message, which:</p>
808 <div class="olist arabic
">
811 <p>explains the problem the change tries to solve, i.e. what is wrong
812 with the current code without the change.</p>
815 <p>justifies the way the change solves the problem, i.e. why the
816 result with the change is better.</p>
819 <p>alternate solutions considered but discarded, if any.</p>
823 <div id="present-tense
" class="paragraph
">
824 <p>The problem statement that describes the status quo is written in the
825 present tense. Write "The code does X when it is given input Y
",
826 instead of "The code used to do Y when given input X
". You do not
827 have to say "Currently
"---the status quo in the problem statement is
828 about the code <em>without</em> your change, by project convention.</p>
830 <div id="imperative-mood
" class="paragraph
">
831 <p>Describe your changes in imperative mood, e.g. "make xyzzy do frotz
"
832 instead of "[This patch] makes xyzzy do frotz
" or "[I] changed xyzzy
833 to do frotz
", as if you are giving orders to the codebase to change
834 its behavior. Try to make sure your explanation can be understood
835 without external resources. Instead of giving a URL to a mailing list
836 archive, summarize the relevant points of the discussion.</p>
838 <div id="commit-reference
" class="paragraph
">
839 <p>There are a few reasons why you may want to refer to another commit in
840 the "more stable
" part of the history (i.e. on branches like <code>maint</code>,
841 <code>master</code>, and <code>next</code>):</p>
843 <div class="olist arabic
">
846 <p>A commit that introduced the root cause of a bug you are fixing.</p>
849 <p>A commit that introduced a feature that you are enhancing.</p>
852 <p>A commit that conflicts with your work when you made a trial merge
853 of your work into <code>next</code> and <code>seen</code> for testing.</p>
857 <div class="paragraph
">
858 <p>When you reference a commit on a more stable branch (like <code>master</code>,
859 <code>maint</code> and <code>next</code>), use the format "abbreviated hash (subject,
860 date)
", like this:</p>
862 <div class="literalblock
">
863 <div class="content
">
864 <pre> Commit f86a374 (pack-bitmap.c: fix a memleak, 2015-03-30)
865 noticed that ...</pre>
868 <div class="paragraph
">
869 <p>The "Copy commit reference
" command of gitk can be used to obtain this
870 format (with the subject enclosed in a pair of double-quotes), or this
871 invocation of <code>git</code> <code>show</code>:</p>
873 <div class="literalblock
">
874 <div class="content
">
875 <pre> git show -s --pretty=reference <commit></pre>
878 <div class="paragraph
">
879 <p>or, on an older version of Git without support for --pretty=reference:</p>
881 <div class="literalblock
">
882 <div class="content
">
883 <pre> git show -s --date=short --pretty='format:%h (%s, %ad)' <commit></pre>
888 <h3 id="sign-off
">Certify your work by adding your <code>Signed-off-by</code> trailer</h3>
889 <div class="paragraph
">
890 <p>To improve tracking of who did what, we ask you to certify that you
891 wrote the patch or have the right to pass it on under the same license
892 as ours, by "signing off
" your patch. Without sign-off, we cannot
893 accept your patches.</p>
895 <div class="paragraph
">
896 <p>If (and only if) you certify the below D-C-O:</p>
898 <div id="dco
" class="quoteblock
">
899 <div class="title
">Developer’s Certificate of Origin 1.1</div>
901 <div class="paragraph
">
902 <p>By making a contribution to this project, I certify that:</p>
904 <div class="olist loweralpha
">
905 <ol class="loweralpha
">
907 <p>The contribution was created in whole or in part by me and I
908 have the right to submit it under the open source license
909 indicated in the file; or</p>
912 <p>The contribution is based upon previous work that, to the best
913 of my knowledge, is covered under an appropriate open source
914 license and I have the right under that license to submit that
915 work with modifications, whether created in whole or in part
916 by me, under the same open source license (unless I am
917 permitted to submit under a different license), as indicated
921 <p>The contribution was provided directly to me by some other
922 person who certified (a), (b) or (c) and I have not modified
926 <p>I understand and agree that this project and the contribution
927 are public and that a record of the contribution (including all
928 personal information I submit with it, including my sign-off) is
929 maintained indefinitely and may be redistributed consistent with
930 this project or the open source license(s) involved.</p>
936 <div class="paragraph
">
937 <p>you add a "Signed-off-by
" trailer to your commit, that looks like
940 <div class="literalblock
">
941 <div class="content
">
942 <pre> Signed-off-by: Random J Developer <random@developer.example.org></pre>
945 <div class="paragraph
">
946 <p>This line can be added by Git if you run the git-commit command with
949 <div class="paragraph
">
950 <p>Notice that you can place your own <code>Signed-off-by</code> trailer when
951 forwarding somebody else’s patch with the above rules for
952 D-C-O. Indeed you are encouraged to do so. Do not forget to
953 place an in-body "From:
" line at the beginning to properly attribute
954 the change to its true author (see (2) above).</p>
956 <div class="paragraph
">
957 <p>This procedure originally came from the Linux kernel project, so our
958 rule is quite similar to theirs, but what exactly it means to sign-off
959 your patch differs from project to project, so it may be different
960 from that of the project you are accustomed to.</p>
962 <div id="real-name
" class="paragraph
">
963 <p>Also notice that a real name is used in the <code>Signed-off-by</code> trailer. Please
964 don’t hide your real name.</p>
966 <div id="commit-trailers
" class="paragraph
">
967 <p>If you like, you can put extra trailers at the end:</p>
969 <div class="olist arabic
">
972 <p><code>Reported-by:</code> is used to credit someone who found the bug that
973 the patch attempts to fix.</p>
976 <p><code>Acked-by:</code> says that the person who is more familiar with the area
977 the patch attempts to modify liked the patch.</p>
980 <p><code>Reviewed-by:</code>, unlike the other trailers, can only be offered by the
981 reviewers themselves when they are completely satisfied with the
982 patch after a detailed analysis.</p>
985 <p><code>Tested-by:</code> is used to indicate that the person applied the patch
986 and found it to have the desired effect.</p>
989 <p><code>Co-authored-by:</code> is used to indicate that people exchanged drafts
990 of a patch before submitting it.</p>
993 <p><code>Helped-by:</code> is used to credit someone who suggested ideas for
994 changes without providing the precise changes in patch form.</p>
997 <p><code>Mentored-by:</code> is used to credit someone with helping develop a
998 patch as part of a mentorship program (e.g., GSoC or Outreachy).</p>
1001 <p><code>Suggested-by:</code> is used to credit someone with suggesting the idea
1006 <div class="paragraph
">
1007 <p>While you can also create your own trailer if the situation warrants it, we
1008 encourage you to instead use one of the common trailers in this project
1009 highlighted above.</p>
1011 <div class="paragraph
">
1012 <p>Only capitalize the very first letter of the trailer, i.e. favor
1013 "Signed-off-by
" over "Signed-Off-By
" and "Acked-by:
" over "Acked-By
".</p>
1017 <h3 id="git-tools
">Generate your patch using Git tools out of your commits.</h3>
1018 <div class="paragraph
">
1019 <p>Git based diff tools generate unidiff which is the preferred format.</p>
1021 <div class="paragraph
">
1022 <p>You do not have to be afraid to use <code>-M</code> option to <code>git</code> <code>diff</code> or
1023 <code>git</code> <code>format-patch</code>, if your patch involves file renames. The
1024 receiving end can handle them just fine.</p>
1026 <div id="review-patch
" class="paragraph
">
1027 <p>Please make sure your patch does not add commented out debugging code,
1028 or include any extra files which do not relate to what your patch
1029 is trying to achieve. Make sure to review
1030 your patch after generating it, to ensure accuracy. Before
1031 sending out, please make sure it cleanly applies to the starting point you
1032 have chosen in the "Choose a starting point
" section.</p>
1034 <div class="admonitionblock note
">
1038 <div class="title
">Note</div>
1040 <td class="content
">
1041 From the perspective of those reviewing your patch, the <code>master</code>
1042 branch is the default expected starting point. So if you have chosen a
1043 different starting point, please communicate this choice in your cover
1051 <h3 id="send-patches
">Sending your patches.</h3>
1053 <h4 id="_choosing_your_reviewers
">Choosing your reviewers</h4>
1054 <div class="admonitionblock note
">
1058 <div class="title
">Note</div>
1060 <td class="content
">
1062 security relevant should be submitted privately to the Git Security
1063 mailing list<sup class="footnote
" id="_footnote_security-ml
">[<a id="_footnoteref_1
" class="footnote
" href="#_footnotedef_1
" title="View footnote.
">1</a>]</sup>, instead of the public mailing list.
1068 <div class="paragraph
">
1069 <p>Send your patch with "To:
" set to the mailing list, with "cc:
" listing
1070 people who are involved in the area you are touching (the <code>git-contacts</code>
1071 script in <code>contrib/contacts/</code><sup class="footnote
" id="_footnote_contrib-scripts
">[<a id="_footnoteref_2
" class="footnote
" href="#_footnotedef_2
" title="View footnote.
">2</a>]</sup> can help to
1072 identify them), to solicit comments and reviews. Also, when you made
1073 trial merges of your topic to <code>next</code> and <code>seen</code>, you may have noticed
1074 work by others conflicting with your changes. There is a good possibility
1075 that these people may know the area you are touching well.</p>
1077 <div class="paragraph
">
1078 <p>If you are using <code>send-email</code>, you can feed it the output of <code>git-contacts</code> like
1081 <div class="literalblock
">
1082 <div class="content
">
1083 <pre> git send-email --cc-cmd='perl contrib/contacts/git-contacts' feature/*.patch</pre>
1086 <div class="paragraph
">
1087 <p>After the list reached a consensus that it is a good idea to apply the
1088 patch, re-send it with "To:
" set to the maintainer<sup class="footnote
">[<a id="_footnoteref_3
" class="footnote
" href="#_footnotedef_3
" title="View footnote.
">3</a>]</sup>
1089 and "cc:
" the list<sup class="footnote
">[<a id="_footnoteref_4
" class="footnote
" href="#_footnotedef_4
" title="View footnote.
">4</a>]</sup> for inclusion. This is especially relevant
1090 when the maintainer did not heavily participate in the discussion and
1091 instead left the review to trusted others.</p>
1093 <div class="paragraph
">
1094 <p>Do not forget to add trailers such as <code>Acked-by:</code>, <code>Reviewed-by:</code> and
1095 <code>Tested-by:</code> lines as necessary to credit people who helped your
1096 patch, and "cc:
" them when sending such a final version for inclusion.</p>
1100 <h4 id="_format_patch_and_send_email
"><code>format-patch</code> and <code>send-email</code></h4>
1101 <div class="paragraph
">
1102 <p>Learn to use <code>format-patch</code> and <code>send-email</code> if possible. These commands
1103 are optimized for the workflow of sending patches, avoiding many ways
1104 your existing e-mail client (often optimized for "multipart/*
" MIME
1105 type e-mails) might render your patches unusable.</p>
1107 <div class="admonitionblock note
">
1111 <div class="title
">Note</div>
1113 <td class="content
">
1114 Here we outline the procedure using <code>format-patch</code> and
1115 <code>send-email</code>, but you can instead use GitGitGadget to send in your
1116 patches (see <a href="MyFirstContribution.html
">MyFirstContribution</a>).
1121 <div class="paragraph
">
1122 <p>People on the Git mailing list need to be able to read and
1123 comment on the changes you are submitting. It is important for
1124 a developer to be able to "quote
" your changes, using standard
1125 e-mail tools, so that they may comment on specific portions of
1126 your code. For this reason, each patch should be submitted
1127 "inline
" in a separate message.</p>
1129 <div class="paragraph
">
1130 <p>All subsequent versions of a patch series and other related patches should be
1131 grouped into their own e-mail thread to help readers find all parts of the
1132 series. To that end, send them as replies to either an additional "cover
1133 letter
" message (see below), the first patch, or the respective preceding patch.
1134 Here is a <a href="MyFirstContribution.html#v2-git-send-email
">step-by-step guide</a> on
1135 how to submit updated versions of a patch series.</p>
1137 <div class="paragraph
">
1138 <p>If your log message (including your name on the
1139 <code>Signed-off-by</code> trailer) is not writable in ASCII, make sure that
1140 you send off a message in the correct encoding.</p>
1142 <div class="admonitionblock warning
">
1146 <div class="title
">Warning</div>
1148 <td class="content
">
1149 Be wary of your MUAs word-wrap
1150 corrupting your patch. Do not cut-n-paste your patch; you can
1151 lose tabs that way if you are not careful.
1156 <div class="paragraph
">
1157 <p>It is a common convention to prefix your subject line with
1158 [PATCH]. This lets people easily distinguish patches from other
1159 e-mail discussions. Use of markers in addition to PATCH within
1160 the brackets to describe the nature of the patch is also
1161 encouraged. E.g. [RFC PATCH] (where RFC stands for "request for
1162 comments
") is often used to indicate a patch needs further
1163 discussion before being accepted, [PATCH v2], [PATCH v3] etc.
1164 are often seen when you are sending an update to what you have
1165 previously sent.</p>
1167 <div class="paragraph
">
1168 <p>The <code>git</code> <code>format-patch</code> command follows the best current practice to
1169 format the body of an e-mail message. At the beginning of the
1170 patch should come your commit message, ending with the
1171 <code>Signed-off-by</code> trailers, and a line that consists of three dashes,
1172 followed by the diffstat information and the patch itself. If
1173 you are forwarding a patch from somebody else, optionally, at
1174 the beginning of the e-mail message just before the commit
1175 message starts, you can put a "From:
" line to name that person.
1176 To change the default "[PATCH]
" in the subject to "[
<text
>]
", use
1177 <code>git</code> <code>format-patch</code> <code>--subject-prefix=</code><em><text></em>. As a shortcut, you
1178 can use <code>--rfc</code> instead of <code>--subject-prefix=</code>"RFC
<code>PATCH
</code>", or
1179 <code>-v</code> <em><n></em> instead of <code>--subject-prefix=</code>"PATCH
<code>v
</code><em><n
></em>".</p>
1181 <div class="paragraph
">
1182 <p>You often want to add additional explanation about the patch,
1183 other than the commit message itself. Place such "cover letter
"
1184 material between the three-dash line and the diffstat. For
1185 patches requiring multiple iterations of review and discussion,
1186 an explanation of changes between each iteration can be kept in
1187 Git-notes and inserted automatically following the three-dash
1188 line via <code>git</code> <code>format-patch</code> <code>--notes</code>.</p>
1190 <div id="the-topic-summary
" class="paragraph
">
1191 <p><strong>This is EXPERIMENTAL</strong>.</p>
1193 <div class="paragraph
">
1194 <p>When sending a topic, you can propose a one-paragraph summary that
1195 should appear in the "What
’s cooking
" report when it is picked up to
1196 explain the topic. If you choose to do so, please write a 2-5 line
1197 paragraph that will fit well in our release notes (see many bulleted
1198 entries in the Documentation/RelNotes/* files for examples), and make
1199 it the first paragraph of the cover letter. For a single-patch
1200 series, use the space between the three-dash line and the diffstat, as
1201 described earlier.</p>
1203 <div id="attachment
" class="paragraph
">
1204 <p>Do not attach the patch as a MIME attachment, compressed or not.
1205 Do not let your e-mail client send quoted-printable. Do not let
1206 your e-mail client send format=flowed which would destroy
1207 whitespaces in your patches. Many
1208 popular e-mail applications will not always transmit a MIME
1209 attachment as plain text, making it impossible to comment on
1210 your code. A MIME attachment also takes a bit more time to
1211 process. This does not decrease the likelihood of your
1212 MIME-attached change being accepted, but it makes it more likely
1213 that it will be postponed.</p>
1215 <div class="paragraph
">
1216 <p>Exception: If your mailer is mangling patches then someone may ask
1217 you to re-send them using MIME, that is OK.</p>
1219 <div id="pgp-signature
" class="paragraph
">
1220 <p>Do not PGP sign your patch. Most likely, your maintainer or other people on the
1221 list would not have your PGP key and would not bother obtaining it anyway.
1222 Your patch is not judged by who you are; a good patch from an unknown origin
1223 has a far better chance of being accepted than a patch from a known, respected
1224 origin that is done poorly or does incorrect things.</p>
1226 <div class="paragraph
">
1227 <p>If you really really really really want to do a PGP signed
1228 patch, format it as "multipart/signed
", not a text/plain message
1229 that starts with <code>-----BEGIN</code> <code>PGP</code> <code>SIGNED</code> <code>MESSAGE-----</code>. That is
1230 not a text/plain, it’s something else.</p>
1235 <h3 id="_handling_conflicts_and_iterating_patches
">Handling Conflicts and Iterating Patches</h3>
1236 <div class="paragraph
">
1237 <p>When revising changes made to your patches, it’s important to
1238 acknowledge the possibility of conflicts with other ongoing topics. To
1239 navigate these potential conflicts effectively, follow the recommended
1240 steps outlined below:</p>
1242 <div class="olist arabic
">
1245 <p>Build on a suitable base branch, see the <a href="#choose-starting-point
">section above</a>,
1246 and format-patch the series. If you are doing "rebase -i
" in-place to
1247 update from the previous round, this will reuse the previous base so
1248 (2) and (3) may become trivial.</p>
1251 <p>Find the base of where the last round was queued</p>
1252 <div class="literalblock
">
1253 <div class="content
">
1254 <pre>$ mine='kn/ref-transaction-symref'
1255 $ git checkout "origin/seen^{/^Merge branch '$mine'}...master
"</pre>
1260 <p>Apply your format-patch result. There are two cases</p>
1261 <div class="olist loweralpha
">
1262 <ol class="loweralpha
" type="a
">
1264 <p>Things apply cleanly and tests fine. Go to (4).</p>
1267 <p>Things apply cleanly but does not build or test fails, or things do
1268 not apply cleanly.</p>
1269 <div class="paragraph
">
1270 <p>In the latter case, you have textual or semantic conflicts coming from
1271 the difference between the old base and the base you used to build in
1272 (1). Identify what caused the breakages (e.g., a topic or two may have
1273 merged since the base used by (2) until the base used by (1)).</p>
1275 <div class="paragraph
">
1276 <p>Check out the latest <em>origin/master</em> (which may be newer than the base
1277 used by (2)), "merge --no-ff
" the topics you newly depend on in there,
1278 and use the result of the merge(s) as the base, rebuild the series and
1279 test again. Run format-patch from the last such merges to the tip of
1280 your topic. If you did</p>
1282 <div class="literalblock
">
1283 <div class="content
">
1284 <pre>$ git checkout origin/master
1285 $ git merge --no-ff --into-name kn/ref-transaction-symref fo/obar
1286 $ git merge --no-ff --into-name kn/ref-transaction-symref ba/zqux
1287 ... rebuild the topic ...</pre>
1290 <div class="paragraph
">
1291 <p>Then you’d just format your topic above these "preparing the ground
"
1294 <div class="literalblock
">
1295 <div class="content
">
1296 <pre>$ git format-patch "HEAD^{/^Merge branch 'ba/zqux'}
"..HEAD</pre>
1299 <div class="paragraph
">
1300 <p>Do not forget to write in the cover letter you did this, including the
1301 topics you have in your base on top of <em>master</em>. Then go to (4).</p>
1308 <p>Make a trial merge of your topic into <em>next</em> and <em>seen</em>, e.g.</p>
1309 <div class="literalblock
">
1310 <div class="content
">
1311 <pre>$ git checkout --detach 'origin/seen'
1312 $ git revert -m 1 <the merge of the previous iteration into seen>
1313 $ git merge kn/ref-transaction-symref</pre>
1316 <div class="paragraph
">
1317 <p>The "revert
" is needed if the previous iteration of your topic is
1318 already in <em>seen</em> (like in this case). You could choose to rebuild
1319 master..origin/seen from scratch while excluding your previous
1320 iteration, which may emulate what happens on the maintainers end more
1323 <div class="paragraph
">
1324 <p>This trial merge may conflict. It is primarily to see what conflicts
1325 <em>other</em> topics may have with your topic. In other words, you do not
1326 have to depend on it to make your topic work on <em>master</em>. It may
1327 become the job of the other topic owners to resolve conflicts if your
1328 topic goes to <em>next</em> before theirs.</p>
1330 <div class="paragraph
">
1331 <p>Make a note on what conflict you saw in the cover letter. You do not
1332 necessarily have to resolve them, but it would be a good opportunity to
1333 learn what others are doing in related areas.</p>
1335 <div class="literalblock
">
1336 <div class="content
">
1337 <pre>$ git checkout --detach 'origin/next'
1338 $ git merge kn/ref-transaction-symref</pre>
1341 <div class="paragraph
">
1342 <p>This is to see what conflicts your topic has with other topics that are
1343 already cooking. This should not conflict if (3)-2 prepared a base on
1344 top of updated master plus dependent topics taken from <em>next</em>. Unless
1345 the context is severe (one way to tell is try the same trial merge with
1346 your old iteration, which may conflict in a similar way), expect that it
1347 will be handled on maintainers end (if it gets unmanageable, I’ll ask to
1348 rebase when I receive your patches).</p>
1357 <h2 id="_subsystems_with_dedicated_maintainers
">Subsystems with dedicated maintainers</h2>
1358 <div class="sectionbody
">
1359 <div class="paragraph
">
1360 <p>Some parts of the system have dedicated maintainers with their own
1366 <p><code>git-gui/</code> comes from git-gui project, maintained by Johannes Sixt:</p>
1367 <div class="literalblock
">
1368 <div class="content
">
1369 <pre>https://github.com/j6t/git-gui</pre>
1374 <p><code>gitk-git/</code> comes from Paul Mackerras’s gitk project:</p>
1375 <div class="literalblock
">
1376 <div class="content
">
1377 <pre>git://git.ozlabs.org/~paulus/gitk</pre>
1380 <div class="literalblock
">
1381 <div class="content
">
1382 <pre>Those who are interested in improving gitk can volunteer to help Paul
1383 maintain it, cf. <YntxL/fTplFm8lr6@cleo>.</pre>
1388 <p><code>po/</code> comes from the localization coordinator, Jiang Xin:</p>
1389 <div class="literalblock
">
1390 <div class="content
">
1391 <pre>https://github.com/git-l10n/git-po/</pre>
1397 <div class="paragraph
">
1398 <p>Patches to these parts should be based on their trees.</p>
1403 <p>The "Git documentation translations
" project, led by Jean-Noël
1404 Avila, translates our documentation pages. Their work products are
1405 maintained separately from this project, not as part of our tree:</p>
1406 <div class="literalblock
">
1407 <div class="content
">
1408 <pre>https://github.com/jnavila/git-manpages-l10n/</pre>
1417 <h2 id="_github_ci
">GitHub CI<a id="GHCI
"></a></h2>
1418 <div class="sectionbody
">
1419 <div class="paragraph
">
1420 <p>With an account at GitHub, you can use GitHub CI to test your changes
1421 on Linux, Mac and Windows. See
1422 <a href="https://github.com/git/git/actions/workflows/main.yml
" class="bare
">https://github.com/git/git/actions/workflows/main.yml</a> for examples of
1425 <div class="paragraph
">
1426 <p>Follow these steps for the initial setup:</p>
1428 <div class="olist arabic
">
1431 <p>Fork <a href="https://github.com/git/git
" class="bare
">https://github.com/git/git</a> to your GitHub account.
1432 You can find detailed instructions how to fork here:
1433 <a href="https://help.github.com/articles/fork-a-repo/
" class="bare
">https://help.github.com/articles/fork-a-repo/</a></p>
1437 <div class="paragraph
">
1438 <p>After the initial setup, CI will run whenever you push new changes
1439 to your fork of Git on GitHub. You can monitor the test state of all your
1440 branches here: <code>https://github.com/</code><Your <code>GitHub</code> <code>handle</code>><code>/git/actions/workflows/main.yml</code></p>
1442 <div class="paragraph
">
1443 <p>If a branch does not pass all test cases then it will be marked with a
1444 red <code>x</code>, instead of a green check. In that case, you can click on the
1445 failing job and navigate to "ci/run-build-and-tests.sh
" and/or
1446 "ci/print-test-failures.sh
". You can also download "Artifacts
" which
1447 are zip archives containing tarred (or zipped) archives with test data
1448 relevant for debugging.</p>
1450 <div class="paragraph
">
1451 <p>Then fix the problem and push your fix to your GitHub fork. This will
1452 trigger a new CI build to ensure all tests pass.</p>
1457 <h2 id="mua
">MUA specific hints</h2>
1458 <div class="sectionbody
">
1459 <div class="paragraph
">
1460 <p>Some of the patches I receive or pick up from the list share common
1461 patterns of breakage. Please make sure your MUA is set up
1462 properly not to corrupt whitespaces.</p>
1464 <div class="paragraph
">
1465 <p>See the DISCUSSION section of <a href="git-format-patch.html
">git-format-patch(1)</a> for hints on
1466 checking your patch by mailing it to yourself and applying with
1467 <a href="git-am.html
">git-am(1)</a>.</p>
1469 <div class="paragraph
">
1470 <p>While you are at it, check the resulting commit log message from
1471 a trial run of applying the patch. If what is in the resulting
1472 commit is not exactly what you would want to see, it is very
1473 likely that your maintainer would end up hand editing the log
1474 message when he applies your patch. Things like "Hi, this is my
1475 first patch.\n
", if you really want to put in the patch e-mail,
1476 should come after the three-dash line that signals the end of the
1480 <h3 id="_pine
">Pine</h3>
1481 <div class="paragraph
">
1482 <p>(Johannes Schindelin)</p>
1484 <div class="literalblock
">
1485 <div class="content
">
1486 <pre>I don't know how many people still use pine, but for those poor
1487 souls it may be good to mention that the quell-flowed-text is
1488 needed for recent versions.
1490 ... the "no-strip-whitespace-before-send
" option, too. AFAIK it
1491 was introduced in 4.60.</pre>
1494 <div class="paragraph
">
1495 <p>(Linus Torvalds)</p>
1497 <div class="literalblock
">
1498 <div class="content
">
1499 <pre>And 4.58 needs at least this.
1501 diff-tree 8326dd8350be64ac7fc805f6563a1d61ad10d32c (from e886a61f76edf5410573e92e38ce22974f9c40f1)
1502 Author: Linus Torvalds <torvalds@g5.osdl.org>
1503 Date: Mon Aug 15 17:23:51 2005 -0700
1505 Fix pine whitespace-corruption bug
1507 There's no excuse for unconditionally removing whitespace from
1508 the pico buffers on close.
1510 diff --git a/pico/pico.c b/pico/pico.c
1513 @@ -219,7 +219,9 @@ PICO *pm;
1514 switch(pico_all_done){ /* prepare for/handle final events */
1515 case COMP_EXIT : /* already confirmed */
1524 <div class="paragraph
">
1525 <p>(Daniel Barkalow)</p>
1527 <div class="literalblock
">
1528 <div class="content
">
1529 <pre>> A patch to SubmittingPatches, MUA specific help section for
1530 > users of Pine 4.63 would be very much appreciated.
1532 Ah, it looks like a recent version changed the default behavior to do the
1533 right thing, and inverted the sense of the configuration option. (Either
1534 that or Gentoo did it.) So you need to set the
1535 "no-strip-whitespace-before-send
" option, unless the option you have is
1536 "strip-whitespace-before-send
", in which case you should avoid checking
1542 <h3 id="_thunderbird_kmail_gmail
">Thunderbird, KMail, GMail</h3>
1543 <div class="paragraph
">
1544 <p>See the MUA-SPECIFIC HINTS section of <a href="git-format-patch.html
">git-format-patch(1)</a>.</p>
1548 <h3 id="_gnus
">Gnus</h3>
1549 <div class="paragraph
">
1550 <p>"|
" in the *Summary* buffer can be used to pipe the current
1551 message to an external program, and this is a handy way to drive
1552 <code>git</code> <code>am</code>. However, if the message is MIME encoded, what is
1553 piped into the program is the representation you see in your
1554 *Article* buffer after unwrapping MIME. This is often not what
1555 you would want for two reasons. It tends to screw up non-ASCII
1556 characters (most notably in people’s names), and also
1557 whitespaces (fatal in patches). Running "C-u g
" to display the
1558 message in raw form before using "|
" to run the pipe can work
1559 this problem around.</p>
1565 <div id="footnotes
">
1567 <div class="footnote
" id="_footnotedef_1
">
1568 <a href="#_footnoteref_1
">1</a>. The Git Security mailing list: <a href="mailto:git-security@googlegroups.com
">git-security@googlegroups.com</a>
1570 <div class="footnote
" id="_footnotedef_2
">
1571 <a href="#_footnoteref_2
">2</a>. Scripts under `contrib/` are not part of the core `git` binary and must be called directly. Clone the Git codebase and run `perl contrib/contacts/git-contacts`.
1573 <div class="footnote
" id="_footnotedef_3
">
1574 <a href="#_footnoteref_3
">3</a>. The current maintainer: <a href="mailto:gitster@pobox.com
">gitster@pobox.com</a>
1576 <div class="footnote
" id="_footnotedef_4
">
1577 <a href="#_footnoteref_4
">4</a>. The mailing list: <a href="mailto:git@vger.kernel.org
">git@vger.kernel.org</a>
1581 <div id="footer-text
">
1582 Last updated 2024-12-16 09:37:26 -0800