blob: 22bd8b34c841361ba46b8d63b9f68ba7f50427c0 [file] [log] [blame]
Junio C Hamano944ce252018-05-30 22:25:261<?xml version="1.0" encoding="UTF-8"?>
Junio C Hamanof2b74942012-11-20 21:06:262<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
3 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
4<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
5<head>
Junio C Hamano9d971152012-12-19 00:43:116<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
Junio C Hamanoa85030a2022-07-27 16:48:217<meta name="generator" content="AsciiDoc 10.2.0" />
Junio C Hamanof2b74942012-11-20 21:06:268<title>How to maintain Git</title>
9<style type="text/css">
Junio C Hamano9d971152012-12-19 00:43:1110/* Shared CSS for AsciiDoc xhtml11 and html5 backends */
11
12/* Default font. */
13body {
14 font-family: Georgia,serif;
15}
16
17/* Title font. */
18h1, h2, h3, h4, h5, h6,
19div.title, caption.title,
20thead, p.table.header,
21#toctitle,
22#author, #revnumber, #revdate, #revremark,
23#footer {
24 font-family: Arial,Helvetica,sans-serif;
Junio C Hamanof2b74942012-11-20 21:06:2625}
26
27body {
28 margin: 1em 5% 1em 5%;
29}
30
31a {
32 color: blue;
33 text-decoration: underline;
34}
35a:visited {
36 color: fuchsia;
37}
38
39em {
40 font-style: italic;
41 color: navy;
42}
43
44strong {
45 font-weight: bold;
46 color: #083194;
47}
48
Junio C Hamanof2b74942012-11-20 21:06:2649h1, h2, h3, h4, h5, h6 {
50 color: #527bbd;
Junio C Hamanof2b74942012-11-20 21:06:2651 margin-top: 1.2em;
52 margin-bottom: 0.5em;
53 line-height: 1.3;
54}
55
56h1, h2, h3 {
57 border-bottom: 2px solid silver;
58}
59h2 {
60 padding-top: 0.5em;
61}
62h3 {
63 float: left;
64}
65h3 + * {
66 clear: left;
67}
Junio C Hamano9d971152012-12-19 00:43:1168h5 {
69 font-size: 1.0em;
70}
Junio C Hamanof2b74942012-11-20 21:06:2671
72div.sectionbody {
Junio C Hamanof2b74942012-11-20 21:06:2673 margin-left: 0;
74}
75
76hr {
77 border: 1px solid silver;
78}
79
80p {
81 margin-top: 0.5em;
82 margin-bottom: 0.5em;
83}
84
85ul, ol, li > p {
86 margin-top: 0;
87}
Junio C Hamano9d971152012-12-19 00:43:1188ul > li { color: #aaa; }
89ul > li > * { color: black; }
Junio C Hamanof2b74942012-11-20 21:06:2690
Junio C Hamanoc14e6ad2014-10-31 20:25:5391.monospaced, code, pre {
92 font-family: "Courier New", Courier, monospace;
93 font-size: inherit;
94 color: navy;
Junio C Hamanof2b74942012-11-20 21:06:2695 padding: 0;
96 margin: 0;
97}
Junio C Hamanoc14e6ad2014-10-31 20:25:5398pre {
99 white-space: pre-wrap;
100}
Junio C Hamanof2b74942012-11-20 21:06:26101
Junio C Hamano9d971152012-12-19 00:43:11102#author {
Junio C Hamanof2b74942012-11-20 21:06:26103 color: #527bbd;
Junio C Hamanof2b74942012-11-20 21:06:26104 font-weight: bold;
105 font-size: 1.1em;
106}
Junio C Hamano9d971152012-12-19 00:43:11107#email {
Junio C Hamanof2b74942012-11-20 21:06:26108}
Junio C Hamano9d971152012-12-19 00:43:11109#revnumber, #revdate, #revremark {
Junio C Hamanof2b74942012-11-20 21:06:26110}
111
Junio C Hamano9d971152012-12-19 00:43:11112#footer {
Junio C Hamanof2b74942012-11-20 21:06:26113 font-size: small;
114 border-top: 2px solid silver;
115 padding-top: 0.5em;
116 margin-top: 4.0em;
117}
Junio C Hamano9d971152012-12-19 00:43:11118#footer-text {
Junio C Hamanof2b74942012-11-20 21:06:26119 float: left;
120 padding-bottom: 0.5em;
121}
Junio C Hamano9d971152012-12-19 00:43:11122#footer-badges {
Junio C Hamanof2b74942012-11-20 21:06:26123 float: right;
124 padding-bottom: 0.5em;
125}
126
Junio C Hamano9d971152012-12-19 00:43:11127#preamble {
Junio C Hamanof2b74942012-11-20 21:06:26128 margin-top: 1.5em;
129 margin-bottom: 1.5em;
130}
Junio C Hamano9d971152012-12-19 00:43:11131div.imageblock, div.exampleblock, div.verseblock,
Junio C Hamanof2b74942012-11-20 21:06:26132div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
133div.admonitionblock {
134 margin-top: 1.0em;
135 margin-bottom: 1.5em;
136}
137div.admonitionblock {
138 margin-top: 2.0em;
139 margin-bottom: 2.0em;
140 margin-right: 10%;
141 color: #606060;
142}
143
144div.content { /* Block element content. */
145 padding: 0;
146}
147
148/* Block element titles. */
149div.title, caption.title {
150 color: #527bbd;
Junio C Hamanof2b74942012-11-20 21:06:26151 font-weight: bold;
152 text-align: left;
153 margin-top: 1.0em;
154 margin-bottom: 0.5em;
155}
156div.title + * {
157 margin-top: 0;
158}
159
160td div.title:first-child {
161 margin-top: 0.0em;
162}
163div.content div.title:first-child {
164 margin-top: 0.0em;
165}
166div.content + div.title {
167 margin-top: 0.0em;
168}
169
170div.sidebarblock > div.content {
171 background: #ffffee;
Junio C Hamano9d971152012-12-19 00:43:11172 border: 1px solid #dddddd;
173 border-left: 4px solid #f0f0f0;
Junio C Hamanof2b74942012-11-20 21:06:26174 padding: 0.5em;
175}
176
177div.listingblock > div.content {
Junio C Hamano9d971152012-12-19 00:43:11178 border: 1px solid #dddddd;
179 border-left: 5px solid #f0f0f0;
180 background: #f8f8f8;
Junio C Hamanof2b74942012-11-20 21:06:26181 padding: 0.5em;
182}
183
184div.quoteblock, div.verseblock {
185 padding-left: 1.0em;
186 margin-left: 1.0em;
187 margin-right: 10%;
Junio C Hamano9d971152012-12-19 00:43:11188 border-left: 5px solid #f0f0f0;
189 color: #888;
Junio C Hamanof2b74942012-11-20 21:06:26190}
191
192div.quoteblock > div.attribution {
193 padding-top: 0.5em;
194 text-align: right;
195}
196
Junio C Hamano9d971152012-12-19 00:43:11197div.verseblock > pre.content {
198 font-family: inherit;
199 font-size: inherit;
Junio C Hamanof2b74942012-11-20 21:06:26200}
201div.verseblock > div.attribution {
202 padding-top: 0.75em;
203 text-align: left;
204}
205/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
206div.verseblock + div.attribution {
207 text-align: left;
208}
209
210div.admonitionblock .icon {
211 vertical-align: top;
212 font-size: 1.1em;
213 font-weight: bold;
214 text-decoration: underline;
215 color: #527bbd;
216 padding-right: 0.5em;
217}
218div.admonitionblock td.content {
219 padding-left: 0.5em;
220 border-left: 3px solid #dddddd;
221}
222
223div.exampleblock > div.content {
224 border-left: 3px solid #dddddd;
225 padding-left: 0.5em;
226}
227
228div.imageblock div.content { padding-left: 0; }
Junio C Hamanoc14e6ad2014-10-31 20:25:53229span.image img { border-style: none; vertical-align: text-bottom; }
Junio C Hamanof2b74942012-11-20 21:06:26230a.image:visited { color: white; }
231
232dl {
233 margin-top: 0.8em;
234 margin-bottom: 0.8em;
235}
236dt {
237 margin-top: 0.5em;
238 margin-bottom: 0;
239 font-style: normal;
240 color: navy;
241}
242dd > *:first-child {
243 margin-top: 0.1em;
244}
245
246ul, ol {
247 list-style-position: outside;
248}
249ol.arabic {
250 list-style-type: decimal;
251}
252ol.loweralpha {
253 list-style-type: lower-alpha;
254}
255ol.upperalpha {
256 list-style-type: upper-alpha;
257}
258ol.lowerroman {
259 list-style-type: lower-roman;
260}
261ol.upperroman {
262 list-style-type: upper-roman;
263}
264
265div.compact ul, div.compact ol,
266div.compact p, div.compact p,
267div.compact div, div.compact div {
268 margin-top: 0.1em;
269 margin-bottom: 0.1em;
270}
271
Junio C Hamanof2b74942012-11-20 21:06:26272tfoot {
273 font-weight: bold;
274}
275td > div.verse {
276 white-space: pre;
277}
Junio C Hamanof2b74942012-11-20 21:06:26278
279div.hdlist {
280 margin-top: 0.8em;
281 margin-bottom: 0.8em;
282}
283div.hdlist tr {
284 padding-bottom: 15px;
285}
286dt.hdlist1.strong, td.hdlist1.strong {
287 font-weight: bold;
288}
289td.hdlist1 {
290 vertical-align: top;
291 font-style: normal;
292 padding-right: 0.8em;
293 color: navy;
294}
295td.hdlist2 {
296 vertical-align: top;
297}
298div.hdlist.compact tr {
299 margin: 0;
300 padding-bottom: 0;
301}
302
303.comment {
304 background: yellow;
305}
306
307.footnote, .footnoteref {
308 font-size: 0.8em;
309}
310
311span.footnote, span.footnoteref {
312 vertical-align: super;
313}
314
315#footnotes {
316 margin: 20px 0 20px 0;
317 padding: 7px 0 0 0;
318}
319
320#footnotes div.footnote {
321 margin: 0 0 5px 0;
322}
323
324#footnotes hr {
325 border: none;
326 border-top: 1px solid silver;
327 height: 1px;
328 text-align: left;
329 margin-left: 0;
330 width: 20%;
331 min-width: 100px;
332}
333
Junio C Hamano9d971152012-12-19 00:43:11334div.colist td {
335 padding-right: 0.5em;
336 padding-bottom: 0.3em;
337 vertical-align: top;
338}
339div.colist td img {
340 margin-top: 0.3em;
Junio C Hamanof2b74942012-11-20 21:06:26341}
342
Junio C Hamano9d971152012-12-19 00:43:11343@media print {
344 #footer-badges { display: none; }
345}
346
347#toc {
Junio C Hamanof2b74942012-11-20 21:06:26348 margin-bottom: 2.5em;
349}
350
Junio C Hamano9d971152012-12-19 00:43:11351#toctitle {
Junio C Hamanof2b74942012-11-20 21:06:26352 color: #527bbd;
Junio C Hamanof2b74942012-11-20 21:06:26353 font-size: 1.1em;
354 font-weight: bold;
355 margin-top: 1.0em;
356 margin-bottom: 0.1em;
357}
358
Junio C Hamanoc14e6ad2014-10-31 20:25:53359div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
Junio C Hamanof2b74942012-11-20 21:06:26360 margin-top: 0;
361 margin-bottom: 0;
362}
363div.toclevel2 {
364 margin-left: 2em;
365 font-size: 0.9em;
366}
367div.toclevel3 {
368 margin-left: 4em;
369 font-size: 0.9em;
370}
371div.toclevel4 {
372 margin-left: 6em;
373 font-size: 0.9em;
374}
Junio C Hamanof2b74942012-11-20 21:06:26375
Junio C Hamano9d971152012-12-19 00:43:11376span.aqua { color: aqua; }
377span.black { color: black; }
378span.blue { color: blue; }
379span.fuchsia { color: fuchsia; }
380span.gray { color: gray; }
381span.green { color: green; }
382span.lime { color: lime; }
383span.maroon { color: maroon; }
384span.navy { color: navy; }
385span.olive { color: olive; }
386span.purple { color: purple; }
387span.red { color: red; }
388span.silver { color: silver; }
389span.teal { color: teal; }
390span.white { color: white; }
391span.yellow { color: yellow; }
392
393span.aqua-background { background: aqua; }
394span.black-background { background: black; }
395span.blue-background { background: blue; }
396span.fuchsia-background { background: fuchsia; }
397span.gray-background { background: gray; }
398span.green-background { background: green; }
399span.lime-background { background: lime; }
400span.maroon-background { background: maroon; }
401span.navy-background { background: navy; }
402span.olive-background { background: olive; }
403span.purple-background { background: purple; }
404span.red-background { background: red; }
405span.silver-background { background: silver; }
406span.teal-background { background: teal; }
407span.white-background { background: white; }
408span.yellow-background { background: yellow; }
409
410span.big { font-size: 2em; }
411span.small { font-size: 0.6em; }
412
413span.underline { text-decoration: underline; }
414span.overline { text-decoration: overline; }
415span.line-through { text-decoration: line-through; }
416
Junio C Hamanoc14e6ad2014-10-31 20:25:53417div.unbreakable { page-break-inside: avoid; }
418
Junio C Hamano9d971152012-12-19 00:43:11419
420/*
421 * xhtml11 specific
422 *
423 * */
424
425div.tableblock {
426 margin-top: 1.0em;
427 margin-bottom: 1.5em;
Junio C Hamanof2b74942012-11-20 21:06:26428}
Junio C Hamano9d971152012-12-19 00:43:11429div.tableblock > table {
430 border: 3px solid #527bbd;
431}
432thead, p.table.header {
Junio C Hamanof2b74942012-11-20 21:06:26433 font-weight: bold;
Junio C Hamano9d971152012-12-19 00:43:11434 color: #527bbd;
435}
436p.table {
437 margin-top: 0;
438}
Junio C Hamano725b0da2020-01-22 22:02:40439/* Because the table frame attribute is overridden by CSS in most browsers. */
Junio C Hamano9d971152012-12-19 00:43:11440div.tableblock > table[frame="void"] {
441 border-style: none;
442}
443div.tableblock > table[frame="hsides"] {
444 border-left-style: none;
445 border-right-style: none;
446}
447div.tableblock > table[frame="vsides"] {
448 border-top-style: none;
449 border-bottom-style: none;
Junio C Hamanof2b74942012-11-20 21:06:26450}
451
Junio C Hamano9d971152012-12-19 00:43:11452
453/*
454 * html5 specific
455 *
456 * */
457
458table.tableblock {
459 margin-top: 1.0em;
460 margin-bottom: 1.5em;
461}
462thead, p.tableblock.header {
463 font-weight: bold;
464 color: #527bbd;
465}
466p.tableblock {
467 margin-top: 0;
468}
469table.tableblock {
470 border-width: 3px;
471 border-spacing: 0px;
472 border-style: solid;
473 border-color: #527bbd;
474 border-collapse: collapse;
475}
476th.tableblock, td.tableblock {
477 border-width: 1px;
478 padding: 4px;
479 border-style: solid;
480 border-color: #527bbd;
Junio C Hamanof2b74942012-11-20 21:06:26481}
482
Junio C Hamano9d971152012-12-19 00:43:11483table.tableblock.frame-topbot {
484 border-left-style: hidden;
485 border-right-style: hidden;
486}
487table.tableblock.frame-sides {
488 border-top-style: hidden;
489 border-bottom-style: hidden;
490}
491table.tableblock.frame-none {
492 border-style: hidden;
493}
494
495th.tableblock.halign-left, td.tableblock.halign-left {
496 text-align: left;
497}
498th.tableblock.halign-center, td.tableblock.halign-center {
499 text-align: center;
500}
501th.tableblock.halign-right, td.tableblock.halign-right {
Junio C Hamanof2b74942012-11-20 21:06:26502 text-align: right;
503}
504
Junio C Hamano9d971152012-12-19 00:43:11505th.tableblock.valign-top, td.tableblock.valign-top {
506 vertical-align: top;
Junio C Hamanof2b74942012-11-20 21:06:26507}
Junio C Hamano9d971152012-12-19 00:43:11508th.tableblock.valign-middle, td.tableblock.valign-middle {
509 vertical-align: middle;
510}
511th.tableblock.valign-bottom, td.tableblock.valign-bottom {
512 vertical-align: bottom;
Junio C Hamanof2b74942012-11-20 21:06:26513}
514
Junio C Hamano9d971152012-12-19 00:43:11515
516/*
517 * manpage specific
518 *
519 * */
520
521body.manpage h1 {
522 padding-top: 0.5em;
523 padding-bottom: 0.5em;
524 border-top: 2px solid silver;
525 border-bottom: 2px solid silver;
526}
527body.manpage h2 {
528 border-style: none;
529}
530body.manpage div.sectionbody {
531 margin-left: 3em;
Junio C Hamanof2b74942012-11-20 21:06:26532}
533
Junio C Hamano9d971152012-12-19 00:43:11534@media print {
535 body.manpage div#toc { display: none; }
536}
Junio C Hamanoc14e6ad2014-10-31 20:25:53537
538
Junio C Hamanof2b74942012-11-20 21:06:26539</style>
540<script type="text/javascript">
541/*<![CDATA[*/
Junio C Hamano2b153182021-12-15 21:00:31542var asciidoc = { // Namespace.
543
544/////////////////////////////////////////////////////////////////////
545// Table Of Contents generator
546/////////////////////////////////////////////////////////////////////
547
548/* Author: Mihai Bazon, September 2002
549 * http://students.infoiasi.ro/~mishoo
550 *
551 * Table Of Content generator
552 * Version: 0.4
553 *
554 * Feel free to use this script under the terms of the GNU General Public
555 * License, as long as you do not remove or alter this notice.
556 */
557
558 /* modified by Troy D. Hanson, September 2006. License: GPL */
559 /* modified by Stuart Rackham, 2006, 2009. License: GPL */
560
561// toclevels = 1..4.
562toc: function (toclevels) {
563
564 function getText(el) {
565 var text = "";
566 for (var i = el.firstChild; i != null; i = i.nextSibling) {
567 if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
568 text += i.data;
569 else if (i.firstChild != null)
570 text += getText(i);
571 }
572 return text;
573 }
574
575 function TocEntry(el, text, toclevel) {
576 this.element = el;
577 this.text = text;
578 this.toclevel = toclevel;
579 }
580
581 function tocEntries(el, toclevels) {
582 var result = new Array;
583 var re = new RegExp('[hH]([1-'+(toclevels+1)+'])');
584 // Function that scans the DOM tree for header elements (the DOM2
585 // nodeIterator API would be a better technique but not supported by all
586 // browsers).
587 var iterate = function (el) {
588 for (var i = el.firstChild; i != null; i = i.nextSibling) {
589 if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
590 var mo = re.exec(i.tagName);
591 if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
592 result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
593 }
594 iterate(i);
595 }
596 }
597 }
598 iterate(el);
599 return result;
600 }
601
602 var toc = document.getElementById("toc");
603 if (!toc) {
604 return;
605 }
606
607 // Delete existing TOC entries in case we're reloading the TOC.
608 var tocEntriesToRemove = [];
609 var i;
610 for (i = 0; i < toc.childNodes.length; i++) {
611 var entry = toc.childNodes[i];
612 if (entry.nodeName.toLowerCase() == 'div'
613 && entry.getAttribute("class")
614 && entry.getAttribute("class").match(/^toclevel/))
615 tocEntriesToRemove.push(entry);
616 }
617 for (i = 0; i < tocEntriesToRemove.length; i++) {
618 toc.removeChild(tocEntriesToRemove[i]);
619 }
620
621 // Rebuild TOC entries.
622 var entries = tocEntries(document.getElementById("content"), toclevels);
623 for (var i = 0; i < entries.length; ++i) {
624 var entry = entries[i];
625 if (entry.element.id == "")
626 entry.element.id = "_toc_" + i;
627 var a = document.createElement("a");
628 a.href = "#" + entry.element.id;
629 a.appendChild(document.createTextNode(entry.text));
630 var div = document.createElement("div");
631 div.appendChild(a);
632 div.className = "toclevel" + entry.toclevel;
633 toc.appendChild(div);
634 }
635 if (entries.length == 0)
636 toc.parentNode.removeChild(toc);
637},
638
639
640/////////////////////////////////////////////////////////////////////
641// Footnotes generator
642/////////////////////////////////////////////////////////////////////
643
644/* Based on footnote generation code from:
645 * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
646 */
647
648footnotes: function () {
649 // Delete existing footnote entries in case we're reloading the footnodes.
650 var i;
651 var noteholder = document.getElementById("footnotes");
652 if (!noteholder) {
653 return;
654 }
655 var entriesToRemove = [];
656 for (i = 0; i < noteholder.childNodes.length; i++) {
657 var entry = noteholder.childNodes[i];
658 if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
659 entriesToRemove.push(entry);
660 }
661 for (i = 0; i < entriesToRemove.length; i++) {
662 noteholder.removeChild(entriesToRemove[i]);
663 }
664
665 // Rebuild footnote entries.
666 var cont = document.getElementById("content");
667 var spans = cont.getElementsByTagName("span");
668 var refs = {};
669 var n = 0;
670 for (i=0; i<spans.length; i++) {
671 if (spans[i].className == "footnote") {
672 n++;
673 var note = spans[i].getAttribute("data-note");
674 if (!note) {
675 // Use [\s\S] in place of . so multi-line matches work.
676 // Because JavaScript has no s (dotall) regex flag.
677 note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
678 spans[i].innerHTML =
679 "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
680 "' title='View footnote' class='footnote'>" + n + "</a>]";
681 spans[i].setAttribute("data-note", note);
682 }
683 noteholder.innerHTML +=
684 "<div class='footnote' id='_footnote_" + n + "'>" +
685 "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
686 n + "</a>. " + note + "</div>";
687 var id =spans[i].getAttribute("id");
688 if (id != null) refs["#"+id] = n;
689 }
690 }
691 if (n == 0)
692 noteholder.parentNode.removeChild(noteholder);
693 else {
694 // Process footnoterefs.
695 for (i=0; i<spans.length; i++) {
696 if (spans[i].className == "footnoteref") {
697 var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
698 href = href.match(/#.*/)[0]; // Because IE return full URL.
699 n = refs[href];
700 spans[i].innerHTML =
701 "[<a href='#_footnote_" + n +
702 "' title='View footnote' class='footnote'>" + n + "</a>]";
703 }
704 }
705 }
706},
707
708install: function(toclevels) {
709 var timerId;
710
711 function reinstall() {
712 asciidoc.footnotes();
713 if (toclevels) {
714 asciidoc.toc(toclevels);
715 }
716 }
717
718 function reinstallAndRemoveTimer() {
719 clearInterval(timerId);
720 reinstall();
721 }
722
723 timerId = setInterval(reinstall, 500);
724 if (document.addEventListener)
725 document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false);
726 else
727 window.onload = reinstallAndRemoveTimer;
728}
729
730}
Junio C Hamano9d971152012-12-19 00:43:11731asciidoc.install();
Junio C Hamanof2b74942012-11-20 21:06:26732/*]]>*/
733</script>
734</head>
Junio C Hamano9d971152012-12-19 00:43:11735<body class="article">
Junio C Hamanof2b74942012-11-20 21:06:26736<div id="header">
737<h1>How to maintain Git</h1>
Junio C Hamanoaedeeae2023-07-18 15:55:30738<span id="revdate">2023-07-18</span>
Junio C Hamanof2b74942012-11-20 21:06:26739</div>
740<div id="content">
Junio C Hamano36d52292013-01-25 21:32:36741<div class="sect1">
742<h2 id="_activities">Activities</h2>
Junio C Hamanof2b74942012-11-20 21:06:26743<div class="sectionbody">
Junio C Hamano076ffcc2013-02-06 05:13:21744<div class="paragraph"><p>The maintainer&#8217;s Git time is spent on three activities.</p></div>
Junio C Hamanof2b74942012-11-20 21:06:26745<div class="ulist"><ul>
746<li>
747<p>
Junio C Hamano36d52292013-01-25 21:32:36748Communication (45%)
Junio C Hamanof2b74942012-11-20 21:06:26749</p>
750<div class="literalblock">
751<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53752<pre><code>Mailing list discussions on general design, fielding user
Junio C Hamanof2b74942012-11-20 21:06:26753questions, diagnosing bug reports; reviewing, commenting on,
Junio C Hamanoc14e6ad2014-10-31 20:25:53754suggesting alternatives to, and rejecting patches.</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:26755</div></div>
756</li>
757<li>
758<p>
Junio C Hamano36d52292013-01-25 21:32:36759Integration (50%)
Junio C Hamanof2b74942012-11-20 21:06:26760</p>
761<div class="literalblock">
762<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53763<pre><code>Applying new patches from the contributors while spotting and
Junio C Hamanof2b74942012-11-20 21:06:26764correcting minor mistakes, shuffling the integration and
765testing branches, pushing the results out, cutting the
Junio C Hamanoc14e6ad2014-10-31 20:25:53766releases, and making announcements.</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:26767</div></div>
768</li>
769<li>
770<p>
Junio C Hamano36d52292013-01-25 21:32:36771Own development (5%)
Junio C Hamanof2b74942012-11-20 21:06:26772</p>
773<div class="literalblock">
774<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53775<pre><code>Scratching my own itch and sending proposed patch series out.</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:26776</div></div>
777</li>
778</ul></div>
Junio C Hamano36d52292013-01-25 21:32:36779</div>
780</div>
781<div class="sect1">
782<h2 id="_the_policy">The Policy</h2>
783<div class="sectionbody">
Junio C Hamanof2b74942012-11-20 21:06:26784<div class="paragraph"><p>The policy on Integration is informally mentioned in "A Note
785from the maintainer" message, which is periodically posted to
786this mailing list after each feature release is made.</p></div>
Junio C Hamanof2b74942012-11-20 21:06:26787<div class="ulist"><ul>
788<li>
789<p>
Junio C Hamanoa9c36342014-02-06 23:33:42790Feature releases are numbered as vX.Y.0 and are meant to
Junio C Hamanof2b74942012-11-20 21:06:26791 contain bugfixes and enhancements in any area, including
792 functionality, performance and usability, without regression.
793</p>
794</li>
795<li>
796<p>
Junio C Hamano36d52292013-01-25 21:32:36797One release cycle for a feature release is expected to last for
798 eight to ten weeks.
799</p>
800</li>
801<li>
802<p>
Junio C Hamanoa9c36342014-02-06 23:33:42803Maintenance releases are numbered as vX.Y.Z and are meant
804 to contain only bugfixes for the corresponding vX.Y.0 feature
805 release and earlier maintenance releases vX.Y.W (W &lt; Z).
Junio C Hamanof2b74942012-11-20 21:06:26806</p>
807</li>
808<li>
809<p>
810<em>master</em> branch is used to prepare for the next feature
811 release. In other words, at some point, the tip of <em>master</em>
Junio C Hamanoa9c36342014-02-06 23:33:42812 branch is tagged with vX.Y.0.
Junio C Hamanof2b74942012-11-20 21:06:26813</p>
814</li>
815<li>
816<p>
817<em>maint</em> branch is used to prepare for the next maintenance
Junio C Hamanoa9c36342014-02-06 23:33:42818 release. After the feature release vX.Y.0 is made, the tip
Junio C Hamanof2b74942012-11-20 21:06:26819 of <em>maint</em> branch is set to that release, and bugfixes will
820 accumulate on the branch, and at some point, the tip of the
Junio C Hamanoa9c36342014-02-06 23:33:42821 branch is tagged with vX.Y.1, vX.Y.2, and so on.
Junio C Hamanof2b74942012-11-20 21:06:26822</p>
823</li>
824<li>
825<p>
826<em>next</em> branch is used to publish changes (both enhancements
827 and fixes) that (1) have worthwhile goal, (2) are in a fairly
828 good shape suitable for everyday use, (3) but have not yet
829 demonstrated to be regression free. New changes are tested
830 in <em>next</em> before merged to <em>master</em>.
831</p>
832</li>
833<li>
834<p>
Junio C Hamanoa8911782020-07-07 05:35:57835<em>seen</em> branch is used to publish other proposed changes that do
Junio C Hamanof2b74942012-11-20 21:06:26836 not yet pass the criteria set for <em>next</em>.
837</p>
838</li>
839<li>
840<p>
Junio C Hamano36d52292013-01-25 21:32:36841The tips of <em>master</em> and <em>maint</em> branches will not be rewound to
842 allow people to build their own customization on top of them.
843 Early in a new development cycle, <em>next</em> is rewound to the tip of
844 <em>master</em> once, but otherwise it will not be rewound until the end
845 of the cycle.
Junio C Hamanof2b74942012-11-20 21:06:26846</p>
847</li>
848<li>
849<p>
Junio C Hamano36d52292013-01-25 21:32:36850Usually <em>master</em> contains all of <em>maint</em> and <em>next</em> contains all
Junio C Hamanoa8911782020-07-07 05:35:57851 of <em>master</em>. <em>seen</em> contains all the topics merged to <em>next</em>, but
Junio C Hamano36d52292013-01-25 21:32:36852 is rebuilt directly on <em>master</em>.
Junio C Hamanof2b74942012-11-20 21:06:26853</p>
854</li>
855<li>
856<p>
857The tip of <em>master</em> is meant to be more stable than any
858 tagged releases, and the users are encouraged to follow it.
859</p>
860</li>
861<li>
862<p>
863The <em>next</em> branch is where new action takes place, and the
864 users are encouraged to test it so that regressions and bugs
865 are found before new topics are merged to <em>master</em>.
866</p>
867</li>
868</ul></div>
Junio C Hamanoa9c36342014-02-06 23:33:42869<div class="paragraph"><p>Note that before v1.9.0 release, the version numbers used to be
870structured slightly differently. vX.Y.Z were feature releases while
871vX.Y.Z.W were maintenance releases for vX.Y.Z.</p></div>
Junio C Hamano36d52292013-01-25 21:32:36872</div>
873</div>
874<div class="sect1">
875<h2 id="_a_typical_git_day">A Typical Git Day</h2>
876<div class="sectionbody">
Junio C Hamano076ffcc2013-02-06 05:13:21877<div class="paragraph"><p>A typical Git day for the maintainer implements the above policy
Junio C Hamanof2b74942012-11-20 21:06:26878by doing the following:</p></div>
879<div class="ulist"><ul>
880<li>
881<p>
Junio C Hamano36d52292013-01-25 21:32:36882Scan mailing list. Respond with review comments, suggestions
883 etc. Kibitz. Collect potentially usable patches from the
884 mailing list. Patches about a single topic go to one mailbox (I
885 read my mail in Gnus, and type \C-o to save/append messages in
886 files in mbox format).
887</p>
888</li>
889<li>
890<p>
891Write his own patches to address issues raised on the list but
892 nobody has stepped up solving. Send it out just like other
893 contributors do, and pick them up just like patches from other
894 contributors (see above).
Junio C Hamanof2b74942012-11-20 21:06:26895</p>
896</li>
897<li>
898<p>
899Review the patches in the saved mailboxes. Edit proposed log
900 message for typofixes and clarifications, and add Acks
901 collected from the list. Edit patch to incorporate "Oops,
902 that should have been like this" fixes from the discussion.
903</p>
904</li>
905<li>
906<p>
907Classify the collected patches and handle <em>master</em> and
908 <em>maint</em> updates:
909</p>
910</li>
911<li>
912<p>
913Obviously correct fixes that pertain to the tip of <em>maint</em>
914 are directly applied to <em>maint</em>.
915</p>
916</li>
917<li>
918<p>
919Obviously correct fixes that pertain to the tip of <em>master</em>
920 are directly applied to <em>master</em>.
921</p>
Junio C Hamano36d52292013-01-25 21:32:36922</li>
923<li>
924<p>
925Other topics are not handled in this step.
926</p>
Junio C Hamanof2b74942012-11-20 21:06:26927<div class="literalblock">
928<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53929<pre><code>This step is done with "git am".</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:26930</div></div>
931<div class="literalblock">
932<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53933<pre><code>$ git checkout master ;# or "git checkout maint"
Junio C Hamano36d52292013-01-25 21:32:36934$ git am -sc3 mailbox
Junio C Hamanoc14e6ad2014-10-31 20:25:53935$ make test</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:26936</div></div>
Junio C Hamanof2b74942012-11-20 21:06:26937<div class="literalblock">
938<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53939<pre><code>In practice, almost no patch directly goes to 'master' or
940'maint'.</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:26941</div></div>
942</li>
943<li>
944<p>
945Review the last issue of "What&#8217;s cooking" message, review the
Junio C Hamano36d52292013-01-25 21:32:36946 topics ready for merging (topic&#8594;master and topic&#8594;maint). Use
947 "Meta/cook -w" script (where Meta/ contains a checkout of the
948 <em>todo</em> branch) to aid this step.
Junio C Hamanof2b74942012-11-20 21:06:26949</p>
950<div class="literalblock">
951<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53952<pre><code>And perform the merge. Use "Meta/Reintegrate -e" script (see
953later) to aid this step.</code></pre>
Junio C Hamano36d52292013-01-25 21:32:36954</div></div>
955<div class="literalblock">
956<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53957<pre><code>$ Meta/cook -w last-issue-of-whats-cooking.mbox</code></pre>
Junio C Hamano36d52292013-01-25 21:32:36958</div></div>
959<div class="literalblock">
960<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:53961<pre><code>$ git checkout master ;# or "git checkout maint"
Junio C Hamano36d52292013-01-25 21:32:36962$ echo ai/topic | Meta/Reintegrate -e ;# "git merge ai/topic"
Junio C Hamanof2b74942012-11-20 21:06:26963$ git log -p ORIG_HEAD.. ;# final review
964$ git diff ORIG_HEAD.. ;# final review
Junio C Hamanoc14e6ad2014-10-31 20:25:53965$ make test ;# final review</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:26966</div></div>
967</li>
968<li>
969<p>
970Handle the remaining patches:
971</p>
972</li>
973<li>
974<p>
975Anything unobvious that is applicable to <em>master</em> (in other
976 words, does not depend on anything that is still in <em>next</em>
977 and not in <em>master</em>) is applied to a new topic branch that
Junio C Hamano357906b2020-03-25 21:32:01978 is forked from the tip of <em>master</em> (or the last feature release,
979 which is a bit older than <em>master</em>). This includes both
Junio C Hamanof2b74942012-11-20 21:06:26980 enhancements and unobvious fixes to <em>master</em>. A topic
Junio C Hamano36d52292013-01-25 21:32:36981 branch is named as ai/topic where "ai" is two-letter string
982 named after author&#8217;s initial and "topic" is a descriptive name
983 of the topic (in other words, "what&#8217;s the series is about").
Junio C Hamanof2b74942012-11-20 21:06:26984</p>
985</li>
986<li>
987<p>
988An unobvious fix meant for <em>maint</em> is applied to a new
Junio C Hamano357906b2020-03-25 21:32:01989 topic branch that is forked from the tip of <em>maint</em> (or the
990 oldest and still relevant maintenance branch). The
991 topic may be named as ai/maint-topic.
Junio C Hamanof2b74942012-11-20 21:06:26992</p>
993</li>
994<li>
995<p>
996Changes that pertain to an existing topic are applied to
997 the branch, but:
998</p>
999</li>
1000<li>
1001<p>
1002obviously correct ones are applied first;
1003</p>
1004</li>
1005<li>
1006<p>
1007questionable ones are discarded or applied to near the tip;
1008</p>
1009</li>
1010<li>
1011<p>
1012Replacement patches to an existing topic are accepted only
1013 for commits not in <em>next</em>.
1014</p>
1015<div class="literalblock">
1016<div class="content">
Junio C Hamano357906b2020-03-25 21:32:011017<pre><code>The initial round is done with:</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:261018</div></div>
1019<div class="literalblock">
1020<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531021<pre><code>$ git checkout ai/topic ;# or "git checkout -b ai/topic master"
1022$ git am -sc3 mailbox</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:261023</div></div>
1024<div class="literalblock">
1025<div class="content">
Junio C Hamano357906b2020-03-25 21:32:011026<pre><code>and replacing an existing topic with subsequent round is done with:</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:261027</div></div>
1028<div class="literalblock">
1029<div class="content">
Junio C Hamano357906b2020-03-25 21:32:011030<pre><code>$ git checkout master...ai/topic ;# try to reapply to the same base
1031$ git am -sc3 mailbox</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:261032</div></div>
1033<div class="literalblock">
1034<div class="content">
Junio C Hamano357906b2020-03-25 21:32:011035<pre><code>to prepare the new round on a detached HEAD, and then</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:261036</div></div>
1037<div class="literalblock">
1038<div class="content">
Junio C Hamano357906b2020-03-25 21:32:011039<pre><code>$ git range-diff @{-1}...
1040$ git diff @{-1}</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:261041</div></div>
1042<div class="literalblock">
1043<div class="content">
Junio C Hamano357906b2020-03-25 21:32:011044<pre><code>to double check what changed since the last round, and finally</code></pre>
1045</div></div>
1046<div class="literalblock">
1047<div class="content">
1048<pre><code>$ git checkout -B @{-1}</code></pre>
1049</div></div>
1050<div class="literalblock">
1051<div class="content">
1052<pre><code>to conclude (the last step is why a topic already in 'next' is
1053not replaced but updated incrementally).</code></pre>
1054</div></div>
1055<div class="literalblock">
1056<div class="content">
1057<pre><code>Whether it is the initial round or a subsequent round, the topic
1058may not build even in isolation, or may break the build when
1059merged to integration branches due to bugs. There may already
1060be obvious and trivial improvements suggested on the list. The
1061maintainer often adds an extra commit, with "SQUASH???" in its
1062title, to fix things up, before publishing the integration
1063branches to make it usable by other developers for testing.
1064These changes are what the maintainer is not 100% committed to
1065(trivial typofixes etc. are often squashed directly into the
1066patches that need fixing, without being applied as a separate
1067"SQUASH???" commit), so that they can be removed easily as needed.</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:261068</div></div>
1069</li>
1070<li>
1071<p>
Junio C Hamano36d52292013-01-25 21:32:361072Merge maint to master as needed:
Junio C Hamanof2b74942012-11-20 21:06:261073</p>
1074<div class="literalblock">
1075<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531076<pre><code>$ git checkout master
Junio C Hamano36d52292013-01-25 21:32:361077$ git merge maint
Junio C Hamanoc14e6ad2014-10-31 20:25:531078$ make test</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:261079</div></div>
1080</li>
1081<li>
1082<p>
Junio C Hamano36d52292013-01-25 21:32:361083Merge master to next as needed:
Junio C Hamanof2b74942012-11-20 21:06:261084</p>
1085<div class="literalblock">
1086<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531087<pre><code>$ git checkout next
Junio C Hamano36d52292013-01-25 21:32:361088$ git merge master
Junio C Hamanoc14e6ad2014-10-31 20:25:531089$ make test</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:261090</div></div>
1091</li>
1092<li>
1093<p>
Junio C Hamano36d52292013-01-25 21:32:361094Review the last issue of "What&#8217;s cooking" again and see if topics
1095 that are ready to be merged to <em>next</em> are still in good shape
1096 (e.g. has there any new issue identified on the list with the
1097 series?)
1098</p>
1099</li>
1100<li>
1101<p>
1102Prepare <em>jch</em> branch, which is used to represent somewhere
Junio C Hamanoa8911782020-07-07 05:35:571103 between <em>master</em> and <em>seen</em> and often is slightly ahead of <em>next</em>.
Junio C Hamano36d52292013-01-25 21:32:361104</p>
1105<div class="literalblock">
1106<div class="content">
Junio C Hamanoe6ab9192022-11-23 04:01:361107<pre><code>$ Meta/Reintegrate master..jch &gt;Meta/redo-jch.sh</code></pre>
Junio C Hamano36d52292013-01-25 21:32:361108</div></div>
1109<div class="literalblock">
1110<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531111<pre><code>The result is a script that lists topics to be merged in order to
Junio C Hamanoa8911782020-07-07 05:35:571112rebuild 'seen' as the input to Meta/Reintegrate script. Remove
Junio C Hamano36d52292013-01-25 21:32:361113later topics that should not be in 'jch' yet. Add a line that
1114consists of '### match next' before the name of the first topic
Junio C Hamanoc14e6ad2014-10-31 20:25:531115in the output that should be in 'jch' but not in 'next' yet.</code></pre>
Junio C Hamano36d52292013-01-25 21:32:361116</div></div>
1117</li>
1118<li>
1119<p>
1120Now we are ready to start merging topics to <em>next</em>. For each
1121 branch whose tip is not merged to <em>next</em>, one of three things can
1122 happen:
1123</p>
1124</li>
1125<li>
1126<p>
1127The commits are all next-worthy; merge the topic to next;
1128</p>
1129</li>
1130<li>
1131<p>
Junio C Hamanof2b74942012-11-20 21:06:261132The new parts are of mixed quality, but earlier ones are
Junio C Hamano36d52292013-01-25 21:32:361133 next-worthy; merge the early parts to next;
Junio C Hamanof2b74942012-11-20 21:06:261134</p>
Junio C Hamanof2b74942012-11-20 21:06:261135</li>
1136<li>
1137<p>
1138Nothing is next-worthy; do not do anything.
1139</p>
Junio C Hamano36d52292013-01-25 21:32:361140<div class="literalblock">
1141<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531142<pre><code>This step is aided with Meta/redo-jch.sh script created earlier.
Junio C Hamano36d52292013-01-25 21:32:361143If a topic that was already in 'next' gained a patch, the script
1144would list it as "ai/topic~1". To include the new patch to the
1145updated 'next', drop the "~1" part; to keep it excluded, do not
1146touch the line. If a topic that was not in 'next' should be
Junio C Hamanoc14e6ad2014-10-31 20:25:531147merged to 'next', add it at the end of the list. Then:</code></pre>
Junio C Hamano36d52292013-01-25 21:32:361148</div></div>
1149<div class="literalblock">
1150<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531151<pre><code>$ git checkout -B jch master
Junio C Hamanoe8c74d82022-11-12 07:59:361152$ sh Meta/redo-jch.sh -c1</code></pre>
Junio C Hamano36d52292013-01-25 21:32:361153</div></div>
1154<div class="literalblock">
1155<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531156<pre><code>to rebuild the 'jch' branch from scratch. "-c1" tells the script
Junio C Hamano36d52292013-01-25 21:32:361157to stop merging at the first line that begins with '###'
Junio C Hamanoc14e6ad2014-10-31 20:25:531158(i.e. the "### match next" line you added earlier).</code></pre>
Junio C Hamano36d52292013-01-25 21:32:361159</div></div>
1160<div class="literalblock">
1161<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531162<pre><code>At this point, build-test the result. It may reveal semantic
Junio C Hamano36d52292013-01-25 21:32:361163conflicts (e.g. a topic renamed a variable, another added a new
1164reference to the variable under its old name), in which case
1165prepare an appropriate merge-fix first (see appendix), and
1166rebuild the 'jch' branch from scratch, starting at the tip of
Junio C Hamanoc14e6ad2014-10-31 20:25:531167'master'.</code></pre>
Junio C Hamano36d52292013-01-25 21:32:361168</div></div>
1169<div class="literalblock">
1170<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531171<pre><code>Then do the same to 'next'</code></pre>
Junio C Hamano36d52292013-01-25 21:32:361172</div></div>
1173<div class="literalblock">
1174<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531175<pre><code>$ git checkout next
1176$ sh Meta/redo-jch.sh -c1 -e</code></pre>
Junio C Hamano36d52292013-01-25 21:32:361177</div></div>
1178<div class="literalblock">
1179<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531180<pre><code>The "-e" option allows the merge message that comes from the
Junio C Hamano36d52292013-01-25 21:32:361181history of the topic and the comments in the "What's cooking" to
1182be edited. The resulting tree should match 'jch' as the same set
1183of topics are merged on 'master'; otherwise there is a mismerge.
1184Investigate why and do not proceed until the mismerge is found
Junio C Hamanoc14e6ad2014-10-31 20:25:531185and rectified.</code></pre>
Junio C Hamano36d52292013-01-25 21:32:361186</div></div>
1187<div class="literalblock">
1188<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531189<pre><code>$ git diff jch next</code></pre>
Junio C Hamano36d52292013-01-25 21:32:361190</div></div>
1191<div class="literalblock">
1192<div class="content">
Junio C Hamanoe6ab9192022-11-23 04:01:361193<pre><code>Then build the rest of 'jch':</code></pre>
1194</div></div>
1195<div class="literalblock">
1196<div class="content">
1197<pre><code>$ git checkout jch
1198$ sh Meta/redo-jch.sh</code></pre>
1199</div></div>
1200<div class="literalblock">
1201<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531202<pre><code>When all is well, clean up the redo-jch.sh script with</code></pre>
Junio C Hamano36d52292013-01-25 21:32:361203</div></div>
1204<div class="literalblock">
1205<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531206<pre><code>$ sh Meta/redo-jch.sh -u</code></pre>
Junio C Hamano36d52292013-01-25 21:32:361207</div></div>
1208<div class="literalblock">
1209<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531210<pre><code>This removes topics listed in the script that have already been
Junio C Hamano36d52292013-01-25 21:32:361211merged to 'master'. This may lose '### match next' marker;
Junio C Hamanoc14e6ad2014-10-31 20:25:531212add it again to the appropriate place when it happens.</code></pre>
Junio C Hamano36d52292013-01-25 21:32:361213</div></div>
Junio C Hamanof2b74942012-11-20 21:06:261214</li>
1215<li>
1216<p>
Junio C Hamanoa8911782020-07-07 05:35:571217Rebuild <em>seen</em>.
Junio C Hamanof2b74942012-11-20 21:06:261218</p>
1219<div class="literalblock">
1220<div class="content">
Junio C Hamanoe6ab9192022-11-23 04:01:361221<pre><code>$ Meta/Reintegrate jch..seen &gt;Meta/redo-seen.sh</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:261222</div></div>
1223<div class="literalblock">
1224<div class="content">
Junio C Hamanoa8911782020-07-07 05:35:571225<pre><code>Edit the result by adding new topics that are not still in 'seen'
Junio C Hamanoc14e6ad2014-10-31 20:25:531226in the script. Then</code></pre>
Junio C Hamano36d52292013-01-25 21:32:361227</div></div>
1228<div class="literalblock">
1229<div class="content">
Junio C Hamanoa8911782020-07-07 05:35:571230<pre><code>$ git checkout -B seen jch
1231$ sh Meta/redo-seen.sh</code></pre>
Junio C Hamano36d52292013-01-25 21:32:361232</div></div>
1233<div class="literalblock">
1234<div class="content">
Junio C Hamanoa8911782020-07-07 05:35:571235<pre><code>When all is well, clean up the redo-seen.sh script with</code></pre>
Junio C Hamano36d52292013-01-25 21:32:361236</div></div>
1237<div class="literalblock">
1238<div class="content">
Junio C Hamanoa8911782020-07-07 05:35:571239<pre><code>$ sh Meta/redo-seen.sh -u</code></pre>
Junio C Hamano36d52292013-01-25 21:32:361240</div></div>
1241<div class="literalblock">
1242<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531243<pre><code>Double check by running</code></pre>
Junio C Hamano36d52292013-01-25 21:32:361244</div></div>
1245<div class="literalblock">
1246<div class="content">
Junio C Hamanoa8911782020-07-07 05:35:571247<pre><code>$ git branch --no-merged seen</code></pre>
Junio C Hamano36d52292013-01-25 21:32:361248</div></div>
1249<div class="literalblock">
1250<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531251<pre><code>to see there is no unexpected leftover topics.</code></pre>
Junio C Hamano36d52292013-01-25 21:32:361252</div></div>
1253<div class="literalblock">
1254<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531255<pre><code>At this point, build-test the result for semantic conflicts, and
Junio C Hamano36d52292013-01-25 21:32:361256if there are, prepare an appropriate merge-fix first (see
Junio C Hamanoa8911782020-07-07 05:35:571257appendix), and rebuild the 'seen' branch from scratch, starting at
Junio C Hamanoc14e6ad2014-10-31 20:25:531258the tip of 'jch'.</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:261259</div></div>
1260</li>
1261<li>
1262<p>
Junio C Hamano36d52292013-01-25 21:32:361263Update "What&#8217;s cooking" message to review the updates to
1264 existing topics, newly added topics and graduated topics.
Junio C Hamanof2b74942012-11-20 21:06:261265</p>
1266<div class="literalblock">
1267<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531268<pre><code>This step is helped with Meta/cook script.</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:261269</div></div>
1270<div class="literalblock">
1271<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531272<pre><code>$ Meta/cook</code></pre>
Junio C Hamano36d52292013-01-25 21:32:361273</div></div>
1274<div class="literalblock">
1275<div class="content">
Junio C Hamanoa8911782020-07-07 05:35:571276<pre><code>This script inspects the history between master..seen, finds tips
Junio C Hamano36d52292013-01-25 21:32:361277of topic branches, compares what it found with the current
1278contents in Meta/whats-cooking.txt, and updates that file.
Junio C Hamanoa8911782020-07-07 05:35:571279Topics not listed in the file but are found in master..seen are
Junio C Hamano36d52292013-01-25 21:32:361280added to the "New topics" section, topics listed in the file that
Junio C Hamanoa8911782020-07-07 05:35:571281are no longer found in master..seen are moved to the "Graduated to
Junio C Hamano36d52292013-01-25 21:32:361282master" section, and topics whose commits changed their states
Junio C Hamanoa8911782020-07-07 05:35:571283(e.g. used to be only in 'seen', now merged to 'next') are updated
Junio C Hamanoc14e6ad2014-10-31 20:25:531284with change markers "&lt;&lt;" and "&gt;&gt;".</code></pre>
Junio C Hamano36d52292013-01-25 21:32:361285</div></div>
1286<div class="literalblock">
1287<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531288<pre><code>Look for lines enclosed in "&lt;&lt;" and "&gt;&gt;"; they hold contents from
Junio C Hamano36d52292013-01-25 21:32:361289old file that are replaced by this integration round. After
1290verifying them, remove the old part. Review the description for
1291each topic and update its doneness and plan as needed. To review
Junio C Hamanoc14e6ad2014-10-31 20:25:531292the updated plan, run</code></pre>
Junio C Hamano36d52292013-01-25 21:32:361293</div></div>
1294<div class="literalblock">
1295<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531296<pre><code>$ Meta/cook -w</code></pre>
Junio C Hamano36d52292013-01-25 21:32:361297</div></div>
1298<div class="literalblock">
1299<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531300<pre><code>which will pick up comments given to the topics, such as "Will
Junio C Hamano36d52292013-01-25 21:32:361301merge to 'next'", etc. (see Meta/cook script to learn what kind
Junio C Hamanoc14e6ad2014-10-31 20:25:531302of phrases are supported).</code></pre>
Junio C Hamanof2b74942012-11-20 21:06:261303</div></div>
1304</li>
1305<li>
1306<p>
Junio C Hamano36d52292013-01-25 21:32:361307Compile, test and install all four (five) integration branches;
1308 Meta/Dothem script may aid this step.
Junio C Hamanof2b74942012-11-20 21:06:261309</p>
1310</li>
1311<li>
1312<p>
Junio C Hamano36d52292013-01-25 21:32:361313Format documentation if the <em>master</em> branch was updated;
1314 Meta/dodoc.sh script may aid this step.
Junio C Hamanof2b74942012-11-20 21:06:261315</p>
Junio C Hamanof2b74942012-11-20 21:06:261316</li>
1317<li>
1318<p>
Junio C Hamano36d52292013-01-25 21:32:361319Push the integration branches out to public places; Meta/pushall
1320 script may aid this step.
Junio C Hamanof2b74942012-11-20 21:06:261321</p>
1322</li>
1323</ul></div>
Junio C Hamano36d52292013-01-25 21:32:361324</div>
1325</div>
1326<div class="sect1">
1327<h2 id="_observations">Observations</h2>
1328<div class="sectionbody">
Junio C Hamanof2b74942012-11-20 21:06:261329<div class="paragraph"><p>Some observations to be made.</p></div>
1330<div class="ulist"><ul>
1331<li>
1332<p>
Junio C Hamano36d52292013-01-25 21:32:361333Each topic is tested individually, and also together with other
Junio C Hamanoa8911782020-07-07 05:35:571334 topics cooking first in <em>seen</em>, then in <em>jch</em> and then in <em>next</em>.
Junio C Hamano36d52292013-01-25 21:32:361335 Until it matures, no part of it is merged to <em>master</em>.
Junio C Hamanof2b74942012-11-20 21:06:261336</p>
1337</li>
1338<li>
1339<p>
1340A topic already in <em>next</em> can get fixes while still in
1341 <em>next</em>. Such a topic will have many merges to <em>next</em> (in
1342 other words, "git log --first-parent next" will show many
Junio C Hamano36d52292013-01-25 21:32:361343 "Merge branch <em>ai/topic</em> to next" for the same topic.
Junio C Hamanof2b74942012-11-20 21:06:261344</p>
1345</li>
1346<li>
1347<p>
1348An unobvious fix for <em>maint</em> is cooked in <em>next</em> and then
1349 merged to <em>master</em> to make extra sure it is Ok and then
1350 merged to <em>maint</em>.
1351</p>
1352</li>
1353<li>
1354<p>
1355Even when <em>next</em> becomes empty (in other words, all topics
1356 prove stable and are merged to <em>master</em> and "git diff master
1357 next" shows empty), it has tons of merge commits that will
1358 never be in <em>master</em>.
1359</p>
1360</li>
1361<li>
1362<p>
1363In principle, "git log --first-parent master..next" should
1364 show nothing but merges (in practice, there are fixup commits
1365 and reverts that are not merges).
1366</p>
1367</li>
1368<li>
1369<p>
1370Commits near the tip of a topic branch that are not in <em>next</em>
1371 are fair game to be discarded, replaced or rewritten.
1372 Commits already merged to <em>next</em> will not be.
1373</p>
1374</li>
1375<li>
1376<p>
1377Being in the <em>next</em> branch is not a guarantee for a topic to
1378 be included in the next feature release. Being in the
1379 <em>master</em> branch typically is.
1380</p>
1381</li>
Junio C Hamano357906b2020-03-25 21:32:011382<li>
1383<p>
1384Due to the nature of "SQUASH???" fix-ups, if the original author
1385 agrees with the suggested changes, it is OK to squash them to
1386 appropriate patches in the next round (when the suggested change
1387 is small enough, the author should not even bother with
1388 "Helped-by"). It is also OK to drop them from the next round
1389 when the original author does not agree with the suggestion, but
1390 the author is expected to say why somewhere in the discussion.
1391</p>
1392</li>
Junio C Hamanof2b74942012-11-20 21:06:261393</ul></div>
1394</div>
1395</div>
Junio C Hamano36d52292013-01-25 21:32:361396<div class="sect1">
1397<h2 id="_appendix">Appendix</h2>
1398<div class="sectionbody">
1399<div class="sect2">
1400<h3 id="_preparing_a_merge_fix">Preparing a "merge-fix"</h3>
1401<div class="paragraph"><p>A merge of two topics may not textually conflict but still have
1402conflict at the semantic level. A classic example is for one topic
1403to rename an variable and all its uses, while another topic adds a
1404new use of the variable under its old name. When these two topics
1405are merged together, the reference to the variable newly added by
1406the latter topic will still use the old name in the result.</p></div>
Junio C Hamanoa8911782020-07-07 05:35:571407<div class="paragraph"><p>The Meta/Reintegrate script that is used by redo-jch and redo-seen
Junio C Hamano36d52292013-01-25 21:32:361408scripts implements a crude but usable way to work this issue around.
1409When the script merges branch $X, it checks if "refs/merge-fix/$X"
1410exists, and if so, the effect of it is squashed into the result of
1411the mechanical merge. In other words,</p></div>
1412<div class="literalblock">
1413<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531414<pre><code>$ echo $X | Meta/Reintegrate</code></pre>
Junio C Hamano36d52292013-01-25 21:32:361415</div></div>
1416<div class="paragraph"><p>is roughly equivalent to this sequence:</p></div>
1417<div class="literalblock">
1418<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531419<pre><code>$ git merge --rerere-autoupdate $X
Junio C Hamano36d52292013-01-25 21:32:361420$ git commit
1421$ git cherry-pick -n refs/merge-fix/$X
Junio C Hamanoc14e6ad2014-10-31 20:25:531422$ git commit --amend</code></pre>
Junio C Hamano36d52292013-01-25 21:32:361423</div></div>
1424<div class="paragraph"><p>The goal of this "prepare a merge-fix" step is to come up with a
1425commit that can be squashed into a result of mechanical merge to
1426correct semantic conflicts.</p></div>
1427<div class="paragraph"><p>After finding that the result of merging branch "ai/topic" to an
Junio C Hamanoa8911782020-07-07 05:35:571428integration branch had such a semantic conflict, say seen~4, check the
Junio C Hamano36d52292013-01-25 21:32:361429problematic merge out on a detached HEAD, edit the working tree to
1430fix the semantic conflict, and make a separate commit to record the
1431fix-up:</p></div>
1432<div class="literalblock">
1433<div class="content">
Junio C Hamanoa8911782020-07-07 05:35:571434<pre><code>$ git checkout seen~4
Junio C Hamano36d52292013-01-25 21:32:361435$ git show -s --pretty=%s ;# double check
Junio C Hamanoa8911782020-07-07 05:35:571436Merge branch 'ai/topic' to seen
Junio C Hamano36d52292013-01-25 21:32:361437$ edit
Junio C Hamanoc14e6ad2014-10-31 20:25:531438$ git commit -m 'merge-fix/ai/topic' -a</code></pre>
Junio C Hamano36d52292013-01-25 21:32:361439</div></div>
1440<div class="paragraph"><p>Then make a reference "refs/merge-fix/ai/topic" to point at this
1441result:</p></div>
1442<div class="literalblock">
1443<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531444<pre><code>$ git update-ref refs/merge-fix/ai/topic HEAD</code></pre>
Junio C Hamano36d52292013-01-25 21:32:361445</div></div>
1446<div class="paragraph"><p>Then double check the result by asking Meta/Reintegrate to redo the
1447merge:</p></div>
1448<div class="literalblock">
1449<div class="content">
Junio C Hamanoa8911782020-07-07 05:35:571450<pre><code>$ git checkout seen~5 ;# the parent of the problem merge
Junio C Hamano36d52292013-01-25 21:32:361451$ echo ai/topic | Meta/Reintegrate
Junio C Hamanoa8911782020-07-07 05:35:571452$ git diff seen~4</code></pre>
Junio C Hamano36d52292013-01-25 21:32:361453</div></div>
1454<div class="paragraph"><p>This time, because you prepared refs/merge-fix/ai/topic, the
1455resulting merge should have been tweaked to include the fix for the
1456semantic conflict.</p></div>
1457<div class="paragraph"><p>Note that this assumes that the order in which conflicting branches
1458are merged does not change. If the reason why merging ai/topic
1459branch needs this merge-fix is because another branch merged earlier
1460to the integration branch changed the underlying assumption ai/topic
1461branch made (e.g. ai/topic branch added a site to refer to a
1462variable, while the other branch renamed that variable and adjusted
Junio C Hamanoa8911782020-07-07 05:35:571463existing use sites), and if you changed redo-jch (or redo-seen) script
Junio C Hamano36d52292013-01-25 21:32:361464to merge ai/topic branch before the other branch, then the above
1465merge-fix should not be applied while merging ai/topic, but should
1466instead be applied while merging the other branch. You would need
1467to move the fix to apply to the other branch, perhaps like this:</p></div>
1468<div class="literalblock">
1469<div class="content">
Junio C Hamanoc14e6ad2014-10-31 20:25:531470<pre><code>$ mf=refs/merge-fix
Junio C Hamano36d52292013-01-25 21:32:361471$ git update-ref $mf/$the_other_branch $mf/ai/topic
Junio C Hamanoc14e6ad2014-10-31 20:25:531472$ git update-ref -d $mf/ai/topic</code></pre>
Junio C Hamano36d52292013-01-25 21:32:361473</div></div>
1474</div>
1475</div>
1476</div>
Junio C Hamanof2b74942012-11-20 21:06:261477</div>
1478<div id="footnotes"><hr /></div>
1479<div id="footer">
1480<div id="footer-text">
Junio C Hamano2ef0ba32018-01-26 23:13:531481Last updated
Junio C Hamanoaedeeae2023-07-18 15:55:301482 2023-07-18 08:53:38 PDT
Junio C Hamanof2b74942012-11-20 21:06:261483</div>
1484</div>
1485</body>
1486</html>