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>git-p4(
1)
</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=
"manpage">
443 <h1>git-p4(
1) Manual Page
</h1>
444 <h2 id=
"_name">NAME
</h2>
445 <div class=
"sectionbody">
446 <p>git-p4 - Import from and submit to Perforce repositories
</p>
451 <h2 id=
"_synopsis">SYNOPSIS
</h2>
452 <div class=
"sectionbody">
453 <div class=
"verseblock">
454 <pre class=
"content"><em>git p4 clone
</em> [
<sync-options
>] [
<clone-options
>]
<p4-depot-path
>…​
455 <em>git p4 sync
</em> [
<sync-options
>] [
<p4-depot-path
>…​]
456 <em>git p4 rebase
</em>
457 <em>git p4 submit
</em> [
<submit-options
>] [
<master-branch-name
>]
</pre>
462 <h2 id=
"_description">DESCRIPTION
</h2>
463 <div class=
"sectionbody">
464 <div class=
"paragraph">
465 <p>This command provides a way to interact with p4 repositories
468 <div class=
"paragraph">
469 <p>Create a new Git repository from an existing p4 repository using
470 <em>git p4 clone
</em>, giving it one or more p4 depot paths. Incorporate
471 new commits from p4 changes with
<em>git p4 sync
</em>. The
<em>sync
</em> command
472 is also used to include new branches from other p4 depot paths.
473 Submit Git changes back to p4 using
<em>git p4 submit
</em>. The command
474 <em>git p4 rebase
</em> does a sync plus rebases the current branch onto
475 the updated p4 remote branch.
</p>
480 <h2 id=
"_examples">EXAMPLES
</h2>
481 <div class=
"sectionbody">
485 <p>Clone a repository:
</p>
486 <div class=
"listingblock">
487 <div class=
"content">
488 <pre>$ git p4 clone //depot/path/project
</pre>
493 <p>Do some work in the newly created Git repository:
</p>
494 <div class=
"listingblock">
495 <div class=
"content">
498 $ git commit -a -m
"edited foo.h"</pre>
503 <p>Update the Git repository with recent changes from p4, rebasing your
505 <div class=
"listingblock">
506 <div class=
"content">
507 <pre>$ git p4 rebase
</pre>
512 <p>Submit your commits back to p4:
</p>
513 <div class=
"listingblock">
514 <div class=
"content">
515 <pre>$ git p4 submit
</pre>
524 <h2 id=
"_commands">COMMANDS
</h2>
525 <div class=
"sectionbody">
527 <h3 id=
"_clone">Clone
</h3>
528 <div class=
"paragraph">
529 <p>Generally,
<em>git p4 clone
</em> is used to create a new Git directory
530 from an existing p4 repository:
</p>
532 <div class=
"listingblock">
533 <div class=
"content">
534 <pre>$ git p4 clone //depot/path/project
</pre>
537 <div class=
"paragraph">
540 <div class=
"olist arabic">
543 <p>Creates an empty Git repository in a subdirectory called
<em>project
</em>.
</p>
546 <p>Imports the full contents of the head revision from the given p4
547 depot path into a single commit in the Git branch
<em>refs/remotes/p4/master
</em>.
</p>
550 <p>Creates a local branch,
<em>master
</em> from this remote and checks it out.
</p>
554 <div class=
"paragraph">
555 <p>To reproduce the entire p4 history in Git, use the
<em>@all
</em> modifier on
558 <div class=
"listingblock">
559 <div class=
"content">
560 <pre>$ git p4 clone //depot/path/project@all
</pre>
565 <h3 id=
"_sync">Sync
</h3>
566 <div class=
"paragraph">
567 <p>As development continues in the p4 repository, those changes can
568 be included in the Git repository using:
</p>
570 <div class=
"listingblock">
571 <div class=
"content">
572 <pre>$ git p4 sync
</pre>
575 <div class=
"paragraph">
576 <p>This command finds new changes in p4 and imports them as Git commits.
</p>
578 <div class=
"paragraph">
579 <p>P4 repositories can be added to an existing Git repository using
580 <em>git p4 sync
</em> too:
</p>
582 <div class=
"listingblock">
583 <div class=
"content">
584 <pre>$ mkdir repo-git
587 $ git p4 sync //path/in/your/perforce/depot
</pre>
590 <div class=
"paragraph">
591 <p>This imports the specified depot into
592 <em>refs/remotes/p4/master
</em> in an existing Git repository. The
593 <code>--branch
</code> option can be used to specify a different branch to
594 be used for the p4 content.
</p>
596 <div class=
"paragraph">
597 <p>If a Git repository includes branches
<em>refs/remotes/origin/p4
</em>, these
598 will be fetched and consulted first during a
<em>git p4 sync
</em>. Since
599 importing directly from p4 is considerably slower than pulling changes
600 from a Git remote, this can be useful in a multi-developer environment.
</p>
602 <div class=
"paragraph">
603 <p>If there are multiple branches, doing
<em>git p4 sync
</em> will automatically
604 use the
"BRANCH DETECTION" algorithm to try to partition new changes
605 into the right branch. This can be overridden with the
<code>--branch
</code>
606 option to specify just a single branch to update.
</p>
610 <h3 id=
"_rebase">Rebase
</h3>
611 <div class=
"paragraph">
612 <p>A common working pattern is to fetch the latest changes from the p4 depot
613 and merge them with local uncommitted changes. Often, the p4 repository
614 is the ultimate location for all code, thus a rebase workflow makes
615 sense. This command does
<em>git p4 sync
</em> followed by
<em>git rebase
</em> to move
616 local commits on top of updated p4 changes.
</p>
618 <div class=
"listingblock">
619 <div class=
"content">
620 <pre>$ git p4 rebase
</pre>
625 <h3 id=
"_submit">Submit
</h3>
626 <div class=
"paragraph">
627 <p>Submitting changes from a Git repository back to the p4 repository
628 requires a separate p4 client workspace. This should be specified
629 using the
<code>P4CLIENT
</code> environment variable or the Git configuration
630 variable
<em>git-p4.client
</em>. The p4 client must exist, but the client root
631 will be created and populated if it does not already exist.
</p>
633 <div class=
"paragraph">
634 <p>To submit all changes that are in the current Git branch but not in
635 the
<em>p4/master
</em> branch, use:
</p>
637 <div class=
"listingblock">
638 <div class=
"content">
639 <pre>$ git p4 submit
</pre>
642 <div class=
"paragraph">
643 <p>To specify a branch other than the current one, use:
</p>
645 <div class=
"listingblock">
646 <div class=
"content">
647 <pre>$ git p4 submit topicbranch
</pre>
650 <div class=
"paragraph">
651 <p>To specify a single commit or a range of commits, use:
</p>
653 <div class=
"listingblock">
654 <div class=
"content">
655 <pre>$ git p4 submit --commit
<sha1
>
656 $ git p4 submit --commit
<sha1..sha1
></pre>
659 <div class=
"paragraph">
660 <p>The upstream reference is generally
<em>refs/remotes/p4/master
</em>, but can
661 be overridden using the
<code>--origin=
</code> command-line option.
</p>
663 <div class=
"paragraph">
664 <p>The p4 changes will be created as the user invoking
<em>git p4 submit
</em>. The
665 <code>--preserve-user
</code> option will cause ownership to be modified
666 according to the author of the Git commit. This option requires admin
667 privileges in p4, which can be granted using
<em>p4 protect
</em>.
</p>
669 <div class=
"paragraph">
670 <p>To shelve changes instead of submitting, use
<code>--shelve
</code> and
<code>--update-shelve
</code>:
</p>
672 <div class=
"listingblock">
673 <div class=
"content">
674 <pre>$ git p4 submit --shelve
675 $ git p4 submit --update-shelve
1234 --update-shelve
2345</pre>
680 <h3 id=
"_unshelve">Unshelve
</h3>
681 <div class=
"paragraph">
682 <p>Unshelving will take a shelved P4 changelist, and produce the equivalent git commit
683 in the branch refs/remotes/p4-unshelved/
<changelist
>.
</p>
685 <div class=
"paragraph">
686 <p>The git commit is created relative to the current origin revision (HEAD by default).
687 A parent commit is created based on the origin, and then the unshelve commit is
688 created based on that.
</p>
690 <div class=
"paragraph">
691 <p>The origin revision can be changed with the
"--origin" option.
</p>
693 <div class=
"paragraph">
694 <p>If the target branch in refs/remotes/p4-unshelved already exists, the old one will
697 <div class=
"listingblock">
698 <div class=
"content">
700 $ git p4 unshelve
12345
701 $ git show p4-unshelved/
12345
702 <submit more changes via p4 to the same files
>
703 $ git p4 unshelve
12345
704 <refuses to unshelve until git is in sync with p4 again
></pre>
711 <h2 id=
"_options">OPTIONS
</h2>
712 <div class=
"sectionbody">
714 <h3 id=
"_general_options">General options
</h3>
715 <div class=
"paragraph">
716 <p>All commands except clone accept these options.
</p>
720 <dt class=
"hdlist1">--git-dir
<dir
></dt>
722 <p>Set the
<code>GIT_DIR
</code> environment variable. See
<a href=
"git.html">git(
1)
</a>.
</p>
724 <dt class=
"hdlist1">-v
</dt>
725 <dt class=
"hdlist1">--verbose
</dt>
727 <p>Provide more progress information.
</p>
733 <h3 id=
"_sync_options">Sync options
</h3>
734 <div class=
"paragraph">
735 <p>These options can be used in the initial
<em>clone
</em> as well as in
736 subsequent
<em>sync
</em> operations.
</p>
740 <dt class=
"hdlist1">--branch
<ref
></dt>
742 <p>Import changes into
<ref
> instead of refs/remotes/p4/master.
743 If
<ref
> starts with refs/, it is used as is. Otherwise, if
744 it does not start with p4/, that prefix is added.
</p>
745 <div class=
"paragraph">
746 <p>By default a
<ref
> not starting with refs/ is treated as the
747 name of a remote-tracking branch (under refs/remotes/). This
748 behavior can be modified using the --import-local option.
</p>
750 <div class=
"paragraph">
751 <p>The default
<ref
> is
"master".
</p>
753 <div class=
"paragraph">
754 <p>This example imports a new remote
"p4/proj2" into an existing
757 <div class=
"listingblock">
758 <div class=
"content">
760 $ git p4 sync --branch=refs/remotes/p4/proj2 //depot/proj2
</pre>
764 <dt class=
"hdlist1">--detect-branches
</dt>
766 <p>Use the branch detection algorithm to find new paths in p4. It is
767 documented below in
"BRANCH DETECTION".
</p>
769 <dt class=
"hdlist1">--changesfile
<file
></dt>
771 <p>Import exactly the p4 change numbers listed in
<em>file
</em>, one per
772 line. Normally,
<em>git p4
</em> inspects the current p4 repository
773 state and detects the changes it should import.
</p>
775 <dt class=
"hdlist1">--silent
</dt>
777 <p>Do not print any progress information.
</p>
779 <dt class=
"hdlist1">--detect-labels
</dt>
781 <p>Query p4 for labels associated with the depot paths, and add
782 them as tags in Git. Limited usefulness as only imports labels
783 associated with new changelists. Deprecated.
</p>
785 <dt class=
"hdlist1">--import-labels
</dt>
787 <p>Import labels from p4 into Git.
</p>
789 <dt class=
"hdlist1">--import-local
</dt>
791 <p>By default, p4 branches are stored in
<em>refs/remotes/p4/
</em>,
792 where they will be treated as remote-tracking branches by
793 <a href=
"git-branch.html">git-branch(
1)
</a> and other commands. This option instead
794 puts p4 branches in
<em>refs/heads/p4/
</em>. Note that future
795 sync operations must specify
<code>--import-local
</code> as well so that
796 they can find the p4 branches in refs/heads.
</p>
798 <dt class=
"hdlist1">--max-changes
<n
></dt>
800 <p>Import at most
<em>n
</em> changes, rather than the entire range of
801 changes included in the given revision specifier. A typical
802 usage would be use
<em>@all
</em> as the revision specifier, but then
803 to use
<em>--max-changes
1000</em> to import only the last
1000
804 revisions rather than the entire revision history.
</p>
806 <dt class=
"hdlist1">--changes-block-size
<n
></dt>
808 <p>The internal block size to use when converting a revision
809 specifier such as
<em>@all
</em> into a list of specific change
810 numbers. Instead of using a single call to
<em>p4 changes
</em> to
811 find the full list of changes for the conversion, there are a
812 sequence of calls to
<em>p4 changes -m
</em>, each of which requests
813 one block of changes of the given size. The default block size
814 is
500, which should usually be suitable.
</p>
816 <dt class=
"hdlist1">--keep-path
</dt>
818 <p>The mapping of file names from the p4 depot path to Git, by
819 default, involves removing the entire depot path. With this
820 option, the full p4 depot path is retained in Git. For example,
821 path
<em>//depot/main/foo/bar.c
</em>, when imported from
822 <em>//depot/main/
</em>, becomes
<em>foo/bar.c
</em>. With
<code>--keep-path
</code>, the
823 Git path is instead
<em>depot/main/foo/bar.c
</em>.
</p>
825 <dt class=
"hdlist1">--use-client-spec
</dt>
827 <p>Use a client spec to find the list of interesting files in p4.
828 See the
"CLIENT SPEC" section below.
</p>
830 <dt class=
"hdlist1">-/
<path
></dt>
832 <p>Exclude selected depot paths when cloning or syncing.
</p>
838 <h3 id=
"_clone_options">Clone options
</h3>
839 <div class=
"paragraph">
840 <p>These options can be used in an initial
<em>clone
</em>, along with the
<em>sync
</em>
841 options described above.
</p>
845 <dt class=
"hdlist1">--destination
<directory
></dt>
847 <p>Where to create the Git repository. If not provided, the last
848 component in the p4 depot path is used to create a new
851 <dt class=
"hdlist1">--bare
</dt>
853 <p>Perform a bare clone. See
<a href=
"git-clone.html">git-clone(
1)
</a>.
</p>
859 <h3 id=
"_submit_options">Submit options
</h3>
860 <div class=
"paragraph">
861 <p>These options can be used to modify
<em>git p4 submit
</em> behavior.
</p>
865 <dt class=
"hdlist1">--origin
<commit
></dt>
867 <p>Upstream location from which commits are identified to submit to
868 p4. By default, this is the most recent p4 commit reachable
869 from
<code>HEAD
</code>.
</p>
871 <dt class=
"hdlist1">-M
</dt>
873 <p>Detect renames. See
<a href=
"git-diff.html">git-diff(
1)
</a>. Renames will be
874 represented in p4 using explicit
<em>move
</em> operations. There
875 is no corresponding option to detect copies, but there are
876 variables for both moves and copies.
</p>
878 <dt class=
"hdlist1">--preserve-user
</dt>
880 <p>Re-author p4 changes before submitting to p4. This option
881 requires p4 admin privileges.
</p>
883 <dt class=
"hdlist1">--export-labels
</dt>
885 <p>Export tags from Git as p4 labels. Tags found in Git are applied
886 to the perforce working directory.
</p>
888 <dt class=
"hdlist1">-n
</dt>
889 <dt class=
"hdlist1">--dry-run
</dt>
891 <p>Show just what commits would be submitted to p4; do not change
892 state in Git or p4.
</p>
894 <dt class=
"hdlist1">--prepare-p4-only
</dt>
896 <p>Apply a commit to the p4 workspace, opening, adding and deleting
897 files in p4 as for a normal submit operation. Do not issue the
898 final
"p4 submit", but instead print a message about how to
899 submit manually or revert. This option always stops after the
900 first (oldest) commit. Git tags are not exported to p4.
</p>
902 <dt class=
"hdlist1">--shelve
</dt>
904 <p>Instead of submitting create a series of shelved changelists.
905 After creating each shelve, the relevant files are reverted/deleted.
906 If you have multiple commits pending multiple shelves will be created.
</p>
908 <dt class=
"hdlist1">--update-shelve CHANGELIST
</dt>
910 <p>Update an existing shelved changelist with this commit. Implies
911 --shelve. Repeat for multiple shelved changelists.
</p>
913 <dt class=
"hdlist1">--conflict=(ask|skip|quit)
</dt>
915 <p>Conflicts can occur when applying a commit to p4. When this
916 happens, the default behavior (
"ask") is to prompt whether to
917 skip this commit and continue, or quit. This option can be used
918 to bypass the prompt, causing conflicting commits to be automatically
919 skipped, or to quit trying to apply commits, without prompting.
</p>
921 <dt class=
"hdlist1">--branch
<branch
></dt>
923 <p>After submitting, sync this named branch instead of the default
924 p4/master. See the
"Sync options" section above for more
927 <dt class=
"hdlist1">--commit (
<sha1
>|
<sha1
>..
<sha1
>)
</dt>
929 <p>Submit only the specified commit or range of commits, instead of the full
930 list of changes that are in the current Git branch.
</p>
932 <dt class=
"hdlist1">--disable-rebase
</dt>
934 <p>Disable the automatic rebase after all commits have been successfully
935 submitted. Can also be set with git-p4.disableRebase.
</p>
937 <dt class=
"hdlist1">--disable-p4sync
</dt>
939 <p>Disable the automatic sync of p4/master from Perforce after commits have
940 been submitted. Implies --disable-rebase. Can also be set with
941 git-p4.disableP4Sync. Sync with origin/master still goes ahead if possible.
</p>
949 <h2 id=
"_hooks_for_submit">Hooks for submit
</h2>
950 <div class=
"sectionbody">
952 <h3 id=
"_p4_pre_submit">p4-pre-submit
</h3>
953 <div class=
"paragraph">
954 <p>The
<code>p4-pre-submit
</code> hook is executed if it exists and is executable.
955 The hook takes no parameters and nothing from standard input. Exiting with
956 non-zero status from this script prevents
<code>git-p4 submit
</code> from launching.
957 It can be bypassed with the
<code>--no-verify
</code> command line option.
</p>
959 <div class=
"paragraph">
960 <p>One usage scenario is to run unit tests in the hook.
</p>
964 <h3 id=
"_p4_prepare_changelist">p4-prepare-changelist
</h3>
965 <div class=
"paragraph">
966 <p>The
<code>p4-prepare-changelist
</code> hook is executed right after preparing
967 the default changelist message and before the editor is started.
968 It takes one parameter, the name of the file that contains the
969 changelist text. Exiting with a non-zero status from the script
970 will abort the process.
</p>
972 <div class=
"paragraph">
973 <p>The purpose of the hook is to edit the message file in place,
974 and it is not suppressed by the
<code>--no-verify
</code> option. This hook
975 is called even if
<code>--prepare-p4-only
</code> is set.
</p>
979 <h3 id=
"_p4_changelist">p4-changelist
</h3>
980 <div class=
"paragraph">
981 <p>The
<code>p4-changelist
</code> hook is executed after the changelist
982 message has been edited by the user. It can be bypassed with the
983 <code>--no-verify
</code> option. It takes a single parameter, the name
984 of the file that holds the proposed changelist text. Exiting
985 with a non-zero status causes the command to abort.
</p>
987 <div class=
"paragraph">
988 <p>The hook is allowed to edit the changelist file and can be used
989 to normalize the text into some project standard format. It can
990 also be used to refuse the Submit after inspect the message file.
</p>
994 <h3 id=
"_p4_post_changelist">p4-post-changelist
</h3>
995 <div class=
"paragraph">
996 <p>The
<code>p4-post-changelist
</code> hook is invoked after the submit has
997 successfully occurred in P4. It takes no parameters and is meant
998 primarily for notification and cannot affect the outcome of the
999 git p4 submit action.
</p>
1003 <h3 id=
"_rebase_options">Rebase options
</h3>
1004 <div class=
"paragraph">
1005 <p>These options can be used to modify
<em>git p4 rebase
</em> behavior.
</p>
1009 <dt class=
"hdlist1">--import-labels
</dt>
1011 <p>Import p4 labels.
</p>
1017 <h3 id=
"_unshelve_options">Unshelve options
</h3>
1020 <dt class=
"hdlist1">--origin
</dt>
1022 <p>Sets the git refspec against which the shelved P4 changelist is compared.
1023 Defaults to p4/master.
</p>
1031 <h2 id=
"_depot_path_syntax">DEPOT PATH SYNTAX
</h2>
1032 <div class=
"sectionbody">
1033 <div class=
"paragraph">
1034 <p>The p4 depot path argument to
<em>git p4 sync
</em> and
<em>git p4 clone
</em> can
1035 be one or more space-separated p4 depot paths, with an optional
1036 p4 revision specifier on the end:
</p>
1040 <dt class=
"hdlist1">"//depot/my/project"</dt>
1042 <p>Import one commit with all files in the
<em>#head
</em> change under that tree.
</p>
1044 <dt class=
"hdlist1">"//depot/my/project@all"</dt>
1046 <p>Import one commit for each change in the history of that depot path.
</p>
1048 <dt class=
"hdlist1">"//depot/my/project@1,6"</dt>
1050 <p>Import only changes
1 through
6.
</p>
1052 <dt class=
"hdlist1">"//depot/proj1@all //depot/proj2@all"</dt>
1054 <p>Import all changes from both named depot paths into a single
1055 repository. Only files below these directories are included.
1056 There is not a subdirectory in Git for each
"proj1" and
"proj2".
1057 You must use the
<code>--destination
</code> option when specifying more
1058 than one depot path. The revision specifier must be specified
1059 identically on each depot path. If there are files in the
1060 depot paths with the same name, the path with the most recently
1061 updated version of the file is the one that appears in Git.
</p>
1065 <div class=
"paragraph">
1066 <p>See
<em>p4 help revisions
</em> for the full syntax of p4 revision specifiers.
</p>
1071 <h2 id=
"_client_spec">CLIENT SPEC
</h2>
1072 <div class=
"sectionbody">
1073 <div class=
"paragraph">
1074 <p>The p4 client specification is maintained with the
<em>p4 client
</em> command
1075 and contains among other fields, a View that specifies how the depot
1076 is mapped into the client repository. The
<em>clone
</em> and
<em>sync
</em> commands
1077 can consult the client spec when given the
<code>--use-client-spec
</code> option or
1078 when the useClientSpec variable is true. After
<em>git p4 clone
</em>, the
1079 useClientSpec variable is automatically set in the repository
1080 configuration file. This allows future
<em>git p4 submit
</em> commands to
1081 work properly; the submit command looks only at the variable and does
1082 not have a command-line option.
</p>
1084 <div class=
"paragraph">
1085 <p>The full syntax for a p4 view is documented in
<em>p4 help views
</em>.
<em>git p4
</em>
1086 knows only a subset of the view syntax. It understands multi-line
1087 mappings, overlays with
<em>+
</em>, exclusions with
<em>-
</em> and double-quotes
1088 around whitespace. Of the possible wildcards,
<em>git p4
</em> only handles
1089 <em>…​</em>, and only when it is at the end of the path.
<em>git p4
</em> will complain
1090 if it encounters an unhandled wildcard.
</p>
1092 <div class=
"paragraph">
1093 <p>Bugs in the implementation of overlap mappings exist. If multiple depot
1094 paths map through overlays to the same location in the repository,
1095 <em>git p4
</em> can choose the wrong one. This is hard to solve without
1096 dedicating a client spec just for
<em>git p4
</em>.
</p>
1098 <div class=
"paragraph">
1099 <p>The name of the client can be given to
<em>git p4
</em> in multiple ways. The
1100 variable
<em>git-p4.client
</em> takes precedence if it exists. Otherwise,
1101 normal p4 mechanisms of determining the client are used: environment
1102 variable
<code>P4CLIENT
</code>, a file referenced by
<code>P4CONFIG
</code>, or the local host name.
</p>
1107 <h2 id=
"_branch_detection">BRANCH DETECTION
</h2>
1108 <div class=
"sectionbody">
1109 <div class=
"paragraph">
1110 <p>P4 does not have the same concept of a branch as Git. Instead,
1111 p4 organizes its content as a directory tree, where by convention
1112 different logical branches are in different locations in the tree.
1113 The
<em>p4 branch
</em> command is used to maintain mappings between
1114 different areas in the tree, and indicate related content.
<em>git p4
</em>
1115 can use these mappings to determine branch relationships.
</p>
1117 <div class=
"paragraph">
1118 <p>If you have a repository where all the branches of interest exist as
1119 subdirectories of a single depot path, you can use
<code>--detect-branches
</code>
1120 when cloning or syncing to have
<em>git p4
</em> automatically find
1121 subdirectories in p4, and to generate these as branches in Git.
</p>
1123 <div class=
"paragraph">
1124 <p>For example, if the P4 repository structure is:
</p>
1126 <div class=
"listingblock">
1127 <div class=
"content">
1128 <pre>//depot/main/...
1129 //depot/branch1/...
</pre>
1132 <div class=
"paragraph">
1133 <p>And
"p4 branch -o branch1" shows a View line that looks like:
</p>
1135 <div class=
"listingblock">
1136 <div class=
"content">
1137 <pre>//depot/main/... //depot/branch1/...
</pre>
1140 <div class=
"paragraph">
1141 <p>Then this
<em>git p4 clone
</em> command:
</p>
1143 <div class=
"listingblock">
1144 <div class=
"content">
1145 <pre>git p4 clone --detect-branches //depot@all
</pre>
1148 <div class=
"paragraph">
1149 <p>produces a separate branch in
<em>refs/remotes/p4/
</em> for //depot/main,
1150 called
<em>master
</em>, and one for //depot/branch1 called
<em>depot/branch1
</em>.
</p>
1152 <div class=
"paragraph">
1153 <p>However, it is not necessary to create branches in p4 to be able to use
1154 them like branches. Because it is difficult to infer branch
1155 relationships automatically, a Git configuration setting
1156 <em>git-p4.branchList
</em> can be used to explicitly identify branch
1157 relationships. It is a list of
"source:destination" pairs, like a
1158 simple p4 branch specification, where the
"source" and
"destination" are
1159 the path elements in the p4 repository. The example above relied on the
1160 presence of the p4 branch. Without p4 branches, the same result will
1163 <div class=
"listingblock">
1164 <div class=
"content">
1167 git config git-p4.branchList main:branch1
1168 git p4 clone --detect-branches //depot@all .
</pre>
1174 <h2 id=
"_performance">PERFORMANCE
</h2>
1175 <div class=
"sectionbody">
1176 <div class=
"paragraph">
1177 <p>The fast-import mechanism used by
<em>git p4
</em> creates one pack file for
1178 each invocation of
<em>git p4 sync
</em>. Normally, Git garbage compression
1179 (
<a href=
"git-gc.html">git-gc(
1)
</a>) automatically compresses these to fewer pack files,
1180 but explicit invocation of
<em>git repack -adf
</em> may improve performance.
</p>
1185 <h2 id=
"_configuration_variables">CONFIGURATION VARIABLES
</h2>
1186 <div class=
"sectionbody">
1187 <div class=
"paragraph">
1188 <p>The following config settings can be used to modify
<em>git p4
</em> behavior.
1189 They all are in the
<em>git-p4
</em> section.
</p>
1192 <h3 id=
"_general_variables">General variables
</h3>
1195 <dt class=
"hdlist1">git-p4.user
</dt>
1197 <p>User specified as an option to all p4 commands, with
<em>-u
<user
></em>.
1198 The environment variable
<code>P4USER
</code> can be used instead.
</p>
1200 <dt class=
"hdlist1">git-p4.password
</dt>
1202 <p>Password specified as an option to all p4 commands, with
1203 <em>-P
<password
></em>.
1204 The environment variable
<code>P4PASS
</code> can be used instead.
</p>
1206 <dt class=
"hdlist1">git-p4.port
</dt>
1208 <p>Port specified as an option to all p4 commands, with
1209 <em>-p
<port
></em>.
1210 The environment variable
<code>P4PORT
</code> can be used instead.
</p>
1212 <dt class=
"hdlist1">git-p4.host
</dt>
1214 <p>Host specified as an option to all p4 commands, with
1215 <em>-h
<host
></em>.
1216 The environment variable
<code>P4HOST
</code> can be used instead.
</p>
1218 <dt class=
"hdlist1">git-p4.client
</dt>
1220 <p>Client specified as an option to all p4 commands, with
1221 <em>-c
<client
></em>, including the client spec.
</p>
1223 <dt class=
"hdlist1">git-p4.retries
</dt>
1225 <p>Specifies the number of times to retry a p4 command (notably,
1226 <em>p4 sync
</em>) if the network times out. The default value is
3.
1227 Set the value to
0 to disable retries or if your p4 version
1228 does not support retries (pre
2012.2).
</p>
1234 <h3 id=
"_clone_and_sync_variables">Clone and sync variables
</h3>
1237 <dt class=
"hdlist1">git-p4.syncFromOrigin
</dt>
1239 <p>Because importing commits from other Git repositories is much faster
1240 than importing them from p4, a mechanism exists to find p4 changes
1241 first in Git remotes. If branches exist under
<em>refs/remote/origin/p4
</em>,
1242 those will be fetched and used when syncing from p4. This
1243 variable can be set to
<em>false
</em> to disable this behavior.
</p>
1245 <dt class=
"hdlist1">git-p4.branchUser
</dt>
1247 <p>One phase in branch detection involves looking at p4 branches
1248 to find new ones to import. By default, all branches are
1249 inspected. This option limits the search to just those owned
1250 by the single user named in the variable.
</p>
1252 <dt class=
"hdlist1">git-p4.branchList
</dt>
1254 <p>List of branches to be imported when branch detection is
1255 enabled. Each entry should be a pair of branch names separated
1256 by a colon (:). This example declares that both branchA and
1257 branchB were created from main:
</p>
1258 <div class=
"listingblock">
1259 <div class=
"content">
1260 <pre>git config git-p4.branchList main:branchA
1261 git config --add git-p4.branchList main:branchB
</pre>
1265 <dt class=
"hdlist1">git-p4.ignoredP4Labels
</dt>
1267 <p>List of p4 labels to ignore. This is built automatically as
1268 unimportable labels are discovered.
</p>
1270 <dt class=
"hdlist1">git-p4.importLabels
</dt>
1272 <p>Import p4 labels into git, as per --import-labels.
</p>
1274 <dt class=
"hdlist1">git-p4.labelImportRegexp
</dt>
1276 <p>Only p4 labels matching this regular expression will be imported. The
1277 default value is
<em>[a-zA-Z0-
9_\-.]+$
</em>.
</p>
1279 <dt class=
"hdlist1">git-p4.useClientSpec
</dt>
1281 <p>Specify that the p4 client spec should be used to identify p4
1282 depot paths of interest. This is equivalent to specifying the
1283 option
<code>--use-client-spec
</code>. See the
"CLIENT SPEC" section above.
1284 This variable is a boolean, not the name of a p4 client.
</p>
1286 <dt class=
"hdlist1">git-p4.pathEncoding
</dt>
1288 <p>Perforce keeps the encoding of a path as given by the originating OS.
1289 Git expects paths encoded as UTF-
8. Use this config to tell git-p4
1290 what encoding Perforce had used for the paths. This encoding is used
1291 to transcode the paths to UTF-
8. As an example, Perforce on Windows
1292 often uses
"cp1252" to encode path names. If this option is passed
1293 into a p4 clone request, it is persisted in the resulting new git
1296 <dt class=
"hdlist1">git-p4.metadataDecodingStrategy
</dt>
1298 <p>Perforce keeps the encoding of a changelist descriptions and user
1299 full names as stored by the client on a given OS. The p4v client
1300 uses the OS-local encoding, and so different users can end up storing
1301 different changelist descriptions or user full names in different
1302 encodings, in the same depot.
1303 Git tolerates inconsistent/incorrect encodings in commit messages
1304 and author names, but expects them to be specified in utf-
8.
1305 git-p4 can use three different decoding strategies in handling the
1306 encoding uncertainty in Perforce:
<em>passthrough
</em> simply passes the
1307 original bytes through from Perforce to git, creating usable but
1308 incorrectly-encoded data when the Perforce data is encoded as
1309 anything other than utf-
8.
<em>strict
</em> expects the Perforce data to be
1310 encoded as utf-
8, and fails to import when this is not true.
1311 <em>fallback
</em> attempts to interpret the data as utf-
8, and otherwise
1312 falls back to using a secondary encoding - by default the common
1313 windows encoding
<em>cp-
1252</em> - with upper-range bytes escaped if
1314 decoding with the fallback encoding also fails.
1315 Under python2 the default strategy is
<em>passthrough
</em> for historical
1316 reasons, and under python3 the default is
<em>fallback
</em>.
1317 When
<em>strict
</em> is selected and decoding fails, the error message will
1318 propose changing this config parameter as a workaround. If this
1319 option is passed into a p4 clone request, it is persisted into the
1320 resulting new git repo.
</p>
1322 <dt class=
"hdlist1">git-p4.metadataFallbackEncoding
</dt>
1324 <p>Specify the fallback encoding to use when decoding Perforce author
1325 names and changelists descriptions using the
<em>fallback
</em> strategy
1326 (see git-p4.metadataDecodingStrategy). The fallback encoding will
1327 only be used when decoding as utf-
8 fails. This option defaults to
1328 cp1252, a common windows encoding. If this option is passed into a
1329 p4 clone request, it is persisted into the resulting new git repo.
</p>
1331 <dt class=
"hdlist1">git-p4.largeFileSystem
</dt>
1333 <p>Specify the system that is used for large (binary) files. Please note
1334 that large file systems do not support the
<em>git p4 submit
</em> command.
1335 Only Git LFS is implemented right now (see
<a href=
"https://git-lfs.github.com/" class=
"bare">https://git-lfs.github.com/
</a>
1336 for more information). Download and install the Git LFS command line
1337 extension to use this option and configure it like this:
</p>
1338 <div class=
"listingblock">
1339 <div class=
"content">
1340 <pre>git config git-p4.largeFileSystem GitLFS
</pre>
1344 <dt class=
"hdlist1">git-p4.largeFileExtensions
</dt>
1346 <p>All files matching a file extension in the list will be processed
1347 by the large file system. Do not prefix the extensions with
<em>.
</em>.
</p>
1349 <dt class=
"hdlist1">git-p4.largeFileThreshold
</dt>
1351 <p>All files with an uncompressed size exceeding the threshold will be
1352 processed by the large file system. By default the threshold is
1353 defined in bytes. Add the suffix k, m, or g to change the unit.
</p>
1355 <dt class=
"hdlist1">git-p4.largeFileCompressedThreshold
</dt>
1357 <p>All files with a compressed size exceeding the threshold will be
1358 processed by the large file system. This option might slow down
1359 your clone/sync process. By default the threshold is defined in
1360 bytes. Add the suffix k, m, or g to change the unit.
</p>
1362 <dt class=
"hdlist1">git-p4.largeFilePush
</dt>
1364 <p>Boolean variable which defines if large files are automatically
1365 pushed to a server.
</p>
1367 <dt class=
"hdlist1">git-p4.keepEmptyCommits
</dt>
1369 <p>A changelist that contains only excluded files will be imported
1370 as an empty commit if this boolean option is set to true.
</p>
1372 <dt class=
"hdlist1">git-p4.mapUser
</dt>
1374 <p>Map a P4 user to a name and email address in Git. Use a string
1375 with the following format to create a mapping:
</p>
1376 <div class=
"listingblock">
1377 <div class=
"content">
1378 <pre>git config --add git-p4.mapUser
"p4user = First Last <mail@address.com>"</pre>
1381 <div class=
"paragraph">
1382 <p>A mapping will override any user information from P4. Mappings for
1383 multiple P4 user can be defined.
</p>
1390 <h3 id=
"_submit_variables">Submit variables
</h3>
1393 <dt class=
"hdlist1">git-p4.detectRenames
</dt>
1395 <p>Detect renames. See
<a href=
"git-diff.html">git-diff(
1)
</a>. This can be true,
1396 false, or a score as expected by
<em>git diff -M
</em>.
</p>
1398 <dt class=
"hdlist1">git-p4.detectCopies
</dt>
1400 <p>Detect copies. See
<a href=
"git-diff.html">git-diff(
1)
</a>. This can be true,
1401 false, or a score as expected by
<em>git diff -C
</em>.
</p>
1403 <dt class=
"hdlist1">git-p4.detectCopiesHarder
</dt>
1405 <p>Detect copies harder. See
<a href=
"git-diff.html">git-diff(
1)
</a>. A boolean.
</p>
1407 <dt class=
"hdlist1">git-p4.preserveUser
</dt>
1409 <p>On submit, re-author changes to reflect the Git author,
1410 regardless of who invokes
<em>git p4 submit
</em>.
</p>
1412 <dt class=
"hdlist1">git-p4.allowMissingP4Users
</dt>
1414 <p>When
<em>preserveUser
</em> is true,
<em>git p4
</em> normally dies if it
1415 cannot find an author in the p4 user map. This setting
1416 submits the change regardless.
</p>
1418 <dt class=
"hdlist1">git-p4.skipSubmitEdit
</dt>
1420 <p>The submit process invokes the editor before each p4 change
1421 is submitted. If this setting is true, though, the editing
1422 step is skipped.
</p>
1424 <dt class=
"hdlist1">git-p4.skipSubmitEditCheck
</dt>
1426 <p>After editing the p4 change message,
<em>git p4
</em> makes sure that
1427 the description really was changed by looking at the file
1428 modification time. This option disables that test.
</p>
1430 <dt class=
"hdlist1">git-p4.allowSubmit
</dt>
1432 <p>By default, any branch can be used as the source for a
<em>git p4
1433 submit
</em> operation. This configuration variable, if set, permits only
1434 the named branches to be used as submit sources. Branch names
1435 must be the short names (no
"refs/heads/"), and should be
1436 separated by commas (
","), with no spaces.
</p>
1438 <dt class=
"hdlist1">git-p4.skipUserNameCheck
</dt>
1440 <p>If the user running
<em>git p4 submit
</em> does not exist in the p4
1441 user map,
<em>git p4
</em> exits. This option can be used to force
1442 submission regardless.
</p>
1444 <dt class=
"hdlist1">git-p4.attemptRCSCleanup
</dt>
1446 <p>If enabled,
<em>git p4 submit
</em> will attempt to cleanup RCS keywords
1447 ($Header$, etc). These would otherwise cause merge conflicts and prevent
1448 the submit going ahead. This option should be considered experimental at
1451 <dt class=
"hdlist1">git-p4.exportLabels
</dt>
1453 <p>Export Git tags to p4 labels, as per --export-labels.
</p>
1455 <dt class=
"hdlist1">git-p4.labelExportRegexp
</dt>
1457 <p>Only p4 labels matching this regular expression will be exported. The
1458 default value is
<em>[a-zA-Z0-
9_\-.]+$
</em>.
</p>
1460 <dt class=
"hdlist1">git-p4.conflict
</dt>
1462 <p>Specify submit behavior when a conflict with p4 is found, as per
1463 --conflict. The default behavior is
<em>ask
</em>.
</p>
1465 <dt class=
"hdlist1">git-p4.disableRebase
</dt>
1467 <p>Do not rebase the tree against p4/master following a submit.
</p>
1469 <dt class=
"hdlist1">git-p4.disableP4Sync
</dt>
1471 <p>Do not sync p4/master with Perforce following a submit. Implies git-p4.disableRebase.
</p>
1479 <h2 id=
"_implementation_details">IMPLEMENTATION DETAILS
</h2>
1480 <div class=
"sectionbody">
1484 <p>Changesets from p4 are imported using Git fast-import.
</p>
1487 <p>Cloning or syncing does not require a p4 client; file contents are
1488 collected using
<em>p4 print
</em>.
</p>
1491 <p>Submitting requires a p4 client, which is not in the same location
1492 as the Git repository. Patches are applied, one at a time, to
1493 this p4 client and submitted from there.
</p>
1496 <p>Each commit imported by
<em>git p4
</em> has a line at the end of the log
1497 message indicating the p4 depot location and change number. This
1498 line is used by later
<em>git p4 sync
</em> operations to know which p4
1499 changes are new.
</p>
1506 <h2 id=
"_git">GIT
</h2>
1507 <div class=
"sectionbody">
1508 <div class=
"paragraph">
1509 <p>Part of the
<a href=
"git.html">git(
1)
</a> suite
</p>
1515 <div id=
"footer-text">
1516 Last updated
2022-
05-
20 17:
49:
41 -
0700