1 <?xml version=
"1.0" encoding=
"UTF-8"?>
2 <!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">
6 <meta http-equiv=
"Content-Type" content=
"application/xhtml+xml; charset=UTF-8" />
7 <meta name=
"generator" content=
"AsciiDoc 10.2.0" />
8 <title>git-p4(
1)
</title>
9 <style type=
"text/css">
10 /* Shared CSS for AsciiDoc xhtml11 and html5 backends */
14 font-family: Georgia,serif;
18 h1, h2, h3, h4, h5, h6,
19 div.title, caption.title,
20 thead, p.table.header,
22 #author, #revnumber, #revdate, #revremark,
24 font-family: Arial,Helvetica,sans-serif;
28 margin:
1em
5%
1em
5%;
33 text-decoration: underline;
49 h1, h2, h3, h4, h5, h6 {
57 border-bottom:
2px solid silver;
77 border:
1px solid silver;
88 ul
> li { color: #aaa; }
89 ul
> li
> * { color: black; }
91 .monospaced, code, pre {
92 font-family:
"Courier New", Courier, monospace;
99 white-space: pre-wrap;
109 #revnumber, #revdate, #revremark {
114 border-top:
2px solid silver;
120 padding-bottom:
0.5em;
124 padding-bottom:
0.5em;
129 margin-bottom:
1.5em;
131 div.imageblock, div.exampleblock, div.verseblock,
132 div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
133 div.admonitionblock {
135 margin-bottom:
1.5em;
137 div.admonitionblock {
139 margin-bottom:
2.0em;
144 div.content { /* Block element content. */
148 /* Block element titles. */
149 div.title, caption.title {
154 margin-bottom:
0.5em;
160 td div.title:first-child {
163 div.content div.title:first-child {
166 div.content + div.title {
170 div.sidebarblock
> div.content {
172 border:
1px solid #dddddd;
173 border-left:
4px solid #f0f0f0;
177 div.listingblock
> div.content {
178 border:
1px solid #dddddd;
179 border-left:
5px solid #f0f0f0;
184 div.quoteblock, div.verseblock {
188 border-left:
5px solid #f0f0f0;
192 div.quoteblock
> div.attribution {
197 div.verseblock
> pre.content {
198 font-family: inherit;
201 div.verseblock
> div.attribution {
205 /* DEPRECATED: Pre version
8.2.7 verse style literal block. */
206 div.verseblock + div.attribution {
210 div.admonitionblock .icon {
214 text-decoration: underline;
216 padding-right:
0.5em;
218 div.admonitionblock td.content {
220 border-left:
3px solid #dddddd;
223 div.exampleblock
> div.content {
224 border-left:
3px solid #dddddd;
228 div.imageblock div.content { padding-left:
0; }
229 span.image img { border-style: none; vertical-align: text-bottom; }
230 a.image:visited { color: white; }
234 margin-bottom:
0.8em;
247 list-style-position: outside;
250 list-style-type: decimal;
253 list-style-type: lower-alpha;
256 list-style-type: upper-alpha;
259 list-style-type: lower-roman;
262 list-style-type: upper-roman;
265 div.compact ul, div.compact ol,
266 div.compact p, div.compact p,
267 div.compact div, div.compact div {
269 margin-bottom:
0.1em;
281 margin-bottom:
0.8em;
284 padding-bottom:
15px;
286 dt.hdlist1.strong, td.hdlist1.strong {
292 padding-right:
0.8em;
298 div.hdlist.compact tr {
307 .footnote, .footnoteref {
311 span.footnote, span.footnoteref {
312 vertical-align: super;
316 margin:
20px
0 20px
0;
320 #footnotes div.footnote {
326 border-top:
1px solid silver;
335 padding-right:
0.5em;
336 padding-bottom:
0.3em;
344 #footer-badges { display: none; }
348 margin-bottom:
2.5em;
356 margin-bottom:
0.1em;
359 div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
376 span.aqua { color: aqua; }
377 span.black { color: black; }
378 span.blue { color: blue; }
379 span.fuchsia { color: fuchsia; }
380 span.gray { color: gray; }
381 span.green { color: green; }
382 span.lime { color: lime; }
383 span.maroon { color: maroon; }
384 span.navy { color: navy; }
385 span.olive { color: olive; }
386 span.purple { color: purple; }
387 span.red { color: red; }
388 span.silver { color: silver; }
389 span.teal { color: teal; }
390 span.white { color: white; }
391 span.yellow { color: yellow; }
393 span.aqua-background { background: aqua; }
394 span.black-background { background: black; }
395 span.blue-background { background: blue; }
396 span.fuchsia-background { background: fuchsia; }
397 span.gray-background { background: gray; }
398 span.green-background { background: green; }
399 span.lime-background { background: lime; }
400 span.maroon-background { background: maroon; }
401 span.navy-background { background: navy; }
402 span.olive-background { background: olive; }
403 span.purple-background { background: purple; }
404 span.red-background { background: red; }
405 span.silver-background { background: silver; }
406 span.teal-background { background: teal; }
407 span.white-background { background: white; }
408 span.yellow-background { background: yellow; }
410 span.big { font-size:
2em; }
411 span.small { font-size:
0.6em; }
413 span.underline { text-decoration: underline; }
414 span.overline { text-decoration: overline; }
415 span.line-through { text-decoration: line-through; }
417 div.unbreakable { page-break-inside: avoid; }
427 margin-bottom:
1.5em;
429 div.tableblock
> table {
430 border:
3px solid #
527bbd;
432 thead, p.table.header {
439 /* Because the table frame attribute is overridden by CSS in most browsers. */
440 div.tableblock
> table[
frame=
"void"] {
443 div.tableblock
> table[
frame=
"hsides"] {
444 border-left-style: none;
445 border-right-style: none;
447 div.tableblock
> table[
frame=
"vsides"] {
448 border-top-style: none;
449 border-bottom-style: none;
460 margin-bottom:
1.5em;
462 thead, p.tableblock.header {
473 border-color: #
527bbd;
474 border-collapse: collapse;
476 th.tableblock, td.tableblock {
480 border-color: #
527bbd;
483 table.tableblock.frame-topbot {
484 border-left-style: hidden;
485 border-right-style: hidden;
487 table.tableblock.frame-sides {
488 border-top-style: hidden;
489 border-bottom-style: hidden;
491 table.tableblock.frame-none {
492 border-style: hidden;
495 th.tableblock.halign-left, td.tableblock.halign-left {
498 th.tableblock.halign-center, td.tableblock.halign-center {
501 th.tableblock.halign-right, td.tableblock.halign-right {
505 th.tableblock.valign-top, td.tableblock.valign-top {
508 th.tableblock.valign-middle, td.tableblock.valign-middle {
509 vertical-align: middle;
511 th.tableblock.valign-bottom, td.tableblock.valign-bottom {
512 vertical-align: bottom;
523 padding-bottom:
0.5em;
524 border-top:
2px solid silver;
525 border-bottom:
2px solid silver;
530 body.manpage div.sectionbody {
535 body.manpage div#toc { display: none; }
540 <script type=
"text/javascript">
542 var asciidoc = { // Namespace.
544 /////////////////////////////////////////////////////////////////////
545 // Table Of Contents generator
546 /////////////////////////////////////////////////////////////////////
548 /* Author: Mihai Bazon, September
2002
549 * http://students.infoiasi.ro/~mishoo
551 * Table Of Content generator
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.
558 /* modified by Troy D. Hanson, September
2006. License: GPL */
559 /* modified by Stuart Rackham,
2006,
2009. License: GPL */
562 toc: function (toclevels) {
564 function getText(el) {
566 for (var i = el.firstChild; i != null; i = i.nextSibling) {
567 if (i.nodeType ==
3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
569 else if (i.firstChild != null)
575 function TocEntry(el, text, toclevel) {
578 this.toclevel = toclevel;
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
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);
602 var toc = document.getElementById(
"toc");
607 // Delete existing TOC entries in case we're reloading the TOC.
608 var tocEntriesToRemove = [];
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);
617 for (i =
0; i < tocEntriesToRemove.length; i++) {
618 toc.removeChild(tocEntriesToRemove[i]);
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");
632 div.className =
"toclevel" + entry.toclevel;
633 toc.appendChild(div);
635 if (entries.length ==
0)
636 toc.parentNode.removeChild(toc);
640 /////////////////////////////////////////////////////////////////////
641 // Footnotes generator
642 /////////////////////////////////////////////////////////////////////
644 /* Based on footnote generation code from:
645 * http://www.brandspankingnew.net/archive/
2005/
07/format_footnote.html
648 footnotes: function () {
649 // Delete existing footnote entries in case we're reloading the footnodes.
651 var noteholder = document.getElementById(
"footnotes");
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);
661 for (i =
0; i < entriesToRemove.length; i++) {
662 noteholder.removeChild(entriesToRemove[i]);
665 // Rebuild footnote entries.
666 var cont = document.getElementById(
"content");
667 var spans = cont.getElementsByTagName(
"span");
670 for (i=
0; i
<spans.length; i++) {
671 if (spans[i].className ==
"footnote") {
673 var note = spans[i].getAttribute(
"data-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];
679 "[<a id='_footnoteref_" + n +
"' href='#_footnote_" + n +
680 "' title='View footnote' class='footnote'>" + n +
"</a>]";
681 spans[i].setAttribute(
"data-note", note);
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;
692 noteholder.parentNode.removeChild(noteholder);
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.
701 "[<a href='#_footnote_" + n +
702 "' title='View footnote' class='footnote'>" + n +
"</a>]";
708 install: function(toclevels) {
711 function reinstall() {
712 asciidoc.footnotes();
714 asciidoc.toc(toclevels);
718 function reinstallAndRemoveTimer() {
719 clearInterval(timerId);
723 timerId = setInterval(reinstall,
500);
724 if (document.addEventListener)
725 document.addEventListener(
"DOMContentLoaded", reinstallAndRemoveTimer, false);
727 window.onload = reinstallAndRemoveTimer;
735 <body class=
"manpage">
738 git-p4(
1) Manual Page
741 <div class=
"sectionbody">
743 Import from and submit to Perforce repositories
749 <h2 id=
"_synopsis">SYNOPSIS
</h2>
750 <div class=
"sectionbody">
751 <div class=
"verseblock">
752 <pre class=
"content"><em>git p4 clone
</em> [
<sync-options
>] [
<clone-options
>]
<p4-depot-path
>…
753 <em>git p4 sync
</em> [
<sync-options
>] [
<p4-depot-path
>…]
754 <em>git p4 rebase
</em>
755 <em>git p4 submit
</em> [
<submit-options
>] [
<master-branch-name
>]
</pre>
756 <div class=
"attribution">
761 <h2 id=
"_description">DESCRIPTION
</h2>
762 <div class=
"sectionbody">
763 <div class=
"paragraph"><p>This command provides a way to interact with p4 repositories
765 <div class=
"paragraph"><p>Create a new Git repository from an existing p4 repository using
766 <em>git p4 clone
</em>, giving it one or more p4 depot paths. Incorporate
767 new commits from p4 changes with
<em>git p4 sync
</em>. The
<em>sync
</em> command
768 is also used to include new branches from other p4 depot paths.
769 Submit Git changes back to p4 using
<em>git p4 submit
</em>. The command
770 <em>git p4 rebase
</em> does a sync plus rebases the current branch onto
771 the updated p4 remote branch.
</p></div>
775 <h2 id=
"_examples">EXAMPLES
</h2>
776 <div class=
"sectionbody">
777 <div class=
"ulist"><ul>
782 <div class=
"listingblock">
783 <div class=
"content">
784 <pre><code>$ git p4 clone //depot/path/project
</code></pre>
789 Do some work in the newly created Git repository:
791 <div class=
"listingblock">
792 <div class=
"content">
793 <pre><code>$ cd project
795 $ git commit -a -m
"edited foo.h"</code></pre>
800 Update the Git repository with recent changes from p4, rebasing your
803 <div class=
"listingblock">
804 <div class=
"content">
805 <pre><code>$ git p4 rebase
</code></pre>
810 Submit your commits back to p4:
812 <div class=
"listingblock">
813 <div class=
"content">
814 <pre><code>$ git p4 submit
</code></pre>
821 <h2 id=
"_commands">COMMANDS
</h2>
822 <div class=
"sectionbody">
824 <h3 id=
"_clone">Clone
</h3>
825 <div class=
"paragraph"><p>Generally,
<em>git p4 clone
</em> is used to create a new Git directory
826 from an existing p4 repository:
</p></div>
827 <div class=
"listingblock">
828 <div class=
"content">
829 <pre><code>$ git p4 clone //depot/path/project
</code></pre>
831 <div class=
"paragraph"><p>This:
</p></div>
832 <div class=
"olist arabic"><ol class=
"arabic">
835 Creates an empty Git repository in a subdirectory called
<em>project
</em>.
840 Imports the full contents of the head revision from the given p4
841 depot path into a single commit in the Git branch
<em>refs/remotes/p4/master
</em>.
846 Creates a local branch,
<em>master
</em> from this remote and checks it out.
850 <div class=
"paragraph"><p>To reproduce the entire p4 history in Git, use the
<em>@all
</em> modifier on
851 the depot path:
</p></div>
852 <div class=
"listingblock">
853 <div class=
"content">
854 <pre><code>$ git p4 clone //depot/path/project@all
</code></pre>
858 <h3 id=
"_sync">Sync
</h3>
859 <div class=
"paragraph"><p>As development continues in the p4 repository, those changes can
860 be included in the Git repository using:
</p></div>
861 <div class=
"listingblock">
862 <div class=
"content">
863 <pre><code>$ git p4 sync
</code></pre>
865 <div class=
"paragraph"><p>This command finds new changes in p4 and imports them as Git commits.
</p></div>
866 <div class=
"paragraph"><p>P4 repositories can be added to an existing Git repository using
867 <em>git p4 sync
</em> too:
</p></div>
868 <div class=
"listingblock">
869 <div class=
"content">
870 <pre><code>$ mkdir repo-git
873 $ git p4 sync //path/in/your/perforce/depot
</code></pre>
875 <div class=
"paragraph"><p>This imports the specified depot into
876 <em>refs/remotes/p4/master
</em> in an existing Git repository. The
877 <code>--branch
</code> option can be used to specify a different branch to
878 be used for the p4 content.
</p></div>
879 <div class=
"paragraph"><p>If a Git repository includes branches
<em>refs/remotes/origin/p4
</em>, these
880 will be fetched and consulted first during a
<em>git p4 sync
</em>. Since
881 importing directly from p4 is considerably slower than pulling changes
882 from a Git remote, this can be useful in a multi-developer environment.
</p></div>
883 <div class=
"paragraph"><p>If there are multiple branches, doing
<em>git p4 sync
</em> will automatically
884 use the
"BRANCH DETECTION" algorithm to try to partition new changes
885 into the right branch. This can be overridden with the
<code>--branch
</code>
886 option to specify just a single branch to update.
</p></div>
889 <h3 id=
"_rebase">Rebase
</h3>
890 <div class=
"paragraph"><p>A common working pattern is to fetch the latest changes from the p4 depot
891 and merge them with local uncommitted changes. Often, the p4 repository
892 is the ultimate location for all code, thus a rebase workflow makes
893 sense. This command does
<em>git p4 sync
</em> followed by
<em>git rebase
</em> to move
894 local commits on top of updated p4 changes.
</p></div>
895 <div class=
"listingblock">
896 <div class=
"content">
897 <pre><code>$ git p4 rebase
</code></pre>
901 <h3 id=
"_submit">Submit
</h3>
902 <div class=
"paragraph"><p>Submitting changes from a Git repository back to the p4 repository
903 requires a separate p4 client workspace. This should be specified
904 using the
<code>P4CLIENT
</code> environment variable or the Git configuration
905 variable
<em>git-p4.client
</em>. The p4 client must exist, but the client root
906 will be created and populated if it does not already exist.
</p></div>
907 <div class=
"paragraph"><p>To submit all changes that are in the current Git branch but not in
908 the
<em>p4/master
</em> branch, use:
</p></div>
909 <div class=
"listingblock">
910 <div class=
"content">
911 <pre><code>$ git p4 submit
</code></pre>
913 <div class=
"paragraph"><p>To specify a branch other than the current one, use:
</p></div>
914 <div class=
"listingblock">
915 <div class=
"content">
916 <pre><code>$ git p4 submit topicbranch
</code></pre>
918 <div class=
"paragraph"><p>To specify a single commit or a range of commits, use:
</p></div>
919 <div class=
"listingblock">
920 <div class=
"content">
921 <pre><code>$ git p4 submit --commit
<sha1
>
922 $ git p4 submit --commit
<sha1..sha1
></code></pre>
924 <div class=
"paragraph"><p>The upstream reference is generally
<em>refs/remotes/p4/master
</em>, but can
925 be overridden using the
<code>--origin=
</code> command-line option.
</p></div>
926 <div class=
"paragraph"><p>The p4 changes will be created as the user invoking
<em>git p4 submit
</em>. The
927 <code>--preserve-user
</code> option will cause ownership to be modified
928 according to the author of the Git commit. This option requires admin
929 privileges in p4, which can be granted using
<em>p4 protect
</em>.
</p></div>
930 <div class=
"paragraph"><p>To shelve changes instead of submitting, use
<code>--shelve
</code> and
<code>--update-shelve
</code>:
</p></div>
931 <div class=
"listingblock">
932 <div class=
"content">
933 <pre><code>$ git p4 submit --shelve
934 $ git p4 submit --update-shelve
1234 --update-shelve
2345</code></pre>
938 <h3 id=
"_unshelve">Unshelve
</h3>
939 <div class=
"paragraph"><p>Unshelving will take a shelved P4 changelist, and produce the equivalent git commit
940 in the branch refs/remotes/p4-unshelved/
<changelist
>.
</p></div>
941 <div class=
"paragraph"><p>The git commit is created relative to the current origin revision (HEAD by default).
942 A parent commit is created based on the origin, and then the unshelve commit is
943 created based on that.
</p></div>
944 <div class=
"paragraph"><p>The origin revision can be changed with the
"--origin" option.
</p></div>
945 <div class=
"paragraph"><p>If the target branch in refs/remotes/p4-unshelved already exists, the old one will
946 be renamed.
</p></div>
947 <div class=
"listingblock">
948 <div class=
"content">
949 <pre><code>$ git p4 sync
950 $ git p4 unshelve
12345
951 $ git show p4-unshelved/
12345
952 <submit more changes via p4 to the same files
>
953 $ git p4 unshelve
12345
954 <refuses to unshelve until git is in sync with p4 again
></code></pre>
960 <h2 id=
"_options">OPTIONS
</h2>
961 <div class=
"sectionbody">
963 <h3 id=
"_general_options">General options
</h3>
964 <div class=
"paragraph"><p>All commands except clone accept these options.
</p></div>
965 <div class=
"dlist"><dl>
967 --git-dir
<dir
>
971 Set the
<code>GIT_DIR
</code> environment variable. See
<a href=
"git.html">git(
1)
</a>.
982 Provide more progress information.
988 <h3 id=
"_sync_options">Sync options
</h3>
989 <div class=
"paragraph"><p>These options can be used in the initial
<em>clone
</em> as well as in
990 subsequent
<em>sync
</em> operations.
</p></div>
991 <div class=
"dlist"><dl>
997 Import changes into
<ref
> instead of refs/remotes/p4/master.
998 If
<ref
> starts with refs/, it is used as is. Otherwise, if
999 it does not start with p4/, that prefix is added.
1001 <div class=
"paragraph"><p>By default a
<ref
> not starting with refs/ is treated as the
1002 name of a remote-tracking branch (under refs/remotes/). This
1003 behavior can be modified using the --import-local option.
</p></div>
1004 <div class=
"paragraph"><p>The default
<ref
> is
"master".
</p></div>
1005 <div class=
"paragraph"><p>This example imports a new remote
"p4/proj2" into an existing
1006 Git repository:
</p></div>
1007 <div class=
"listingblock">
1008 <div class=
"content">
1009 <pre><code> $ git init
1010 $ git p4 sync --branch=refs/remotes/p4/proj2 //depot/proj2
</code></pre>
1013 <dt class=
"hdlist1">
1018 Use the branch detection algorithm to find new paths in p4. It is
1019 documented below in
"BRANCH DETECTION".
1022 <dt class=
"hdlist1">
1023 --changesfile
<file
>
1027 Import exactly the p4 change numbers listed in
<em>file
</em>, one per
1028 line. Normally,
<em>git p4
</em> inspects the current p4 repository
1029 state and detects the changes it should import.
1032 <dt class=
"hdlist1">
1037 Do not print any progress information.
1040 <dt class=
"hdlist1">
1045 Query p4 for labels associated with the depot paths, and add
1046 them as tags in Git. Limited usefulness as only imports labels
1047 associated with new changelists. Deprecated.
1050 <dt class=
"hdlist1">
1055 Import labels from p4 into Git.
1058 <dt class=
"hdlist1">
1063 By default, p4 branches are stored in
<em>refs/remotes/p4/
</em>,
1064 where they will be treated as remote-tracking branches by
1065 <a href=
"git-branch.html">git-branch(
1)
</a> and other commands. This option instead
1066 puts p4 branches in
<em>refs/heads/p4/
</em>. Note that future
1067 sync operations must specify
<code>--import-local
</code> as well so that
1068 they can find the p4 branches in refs/heads.
1071 <dt class=
"hdlist1">
1072 --max-changes
<n
>
1076 Import at most
<em>n
</em> changes, rather than the entire range of
1077 changes included in the given revision specifier. A typical
1078 usage would be use
<em>@all
</em> as the revision specifier, but then
1079 to use
<em>--max-changes
1000</em> to import only the last
1000
1080 revisions rather than the entire revision history.
1083 <dt class=
"hdlist1">
1084 --changes-block-size
<n
>
1088 The internal block size to use when converting a revision
1089 specifier such as
<em>@all
</em> into a list of specific change
1090 numbers. Instead of using a single call to
<em>p4 changes
</em> to
1091 find the full list of changes for the conversion, there are a
1092 sequence of calls to
<em>p4 changes -m
</em>, each of which requests
1093 one block of changes of the given size. The default block size
1094 is
500, which should usually be suitable.
1097 <dt class=
"hdlist1">
1102 The mapping of file names from the p4 depot path to Git, by
1103 default, involves removing the entire depot path. With this
1104 option, the full p4 depot path is retained in Git. For example,
1105 path
<em>//depot/main/foo/bar.c
</em>, when imported from
1106 <em>//depot/main/
</em>, becomes
<em>foo/bar.c
</em>. With
<code>--keep-path
</code>, the
1107 Git path is instead
<em>depot/main/foo/bar.c
</em>.
1110 <dt class=
"hdlist1">
1115 Use a client spec to find the list of interesting files in p4.
1116 See the
"CLIENT SPEC" section below.
1119 <dt class=
"hdlist1">
1124 Exclude selected depot paths when cloning or syncing.
1130 <h3 id=
"_clone_options">Clone options
</h3>
1131 <div class=
"paragraph"><p>These options can be used in an initial
<em>clone
</em>, along with the
<em>sync
</em>
1132 options described above.
</p></div>
1133 <div class=
"dlist"><dl>
1134 <dt class=
"hdlist1">
1135 --destination
<directory
>
1139 Where to create the Git repository. If not provided, the last
1140 component in the p4 depot path is used to create a new
1144 <dt class=
"hdlist1">
1149 Perform a bare clone. See
<a href=
"git-clone.html">git-clone(
1)
</a>.
1155 <h3 id=
"_submit_options">Submit options
</h3>
1156 <div class=
"paragraph"><p>These options can be used to modify
<em>git p4 submit
</em> behavior.
</p></div>
1157 <div class=
"dlist"><dl>
1158 <dt class=
"hdlist1">
1159 --origin
<commit
>
1163 Upstream location from which commits are identified to submit to
1164 p4. By default, this is the most recent p4 commit reachable
1165 from
<code>HEAD
</code>.
1168 <dt class=
"hdlist1">
1173 Detect renames. See
<a href=
"git-diff.html">git-diff(
1)
</a>. Renames will be
1174 represented in p4 using explicit
<em>move
</em> operations. There
1175 is no corresponding option to detect copies, but there are
1176 variables for both moves and copies.
1179 <dt class=
"hdlist1">
1184 Re-author p4 changes before submitting to p4. This option
1185 requires p4 admin privileges.
1188 <dt class=
"hdlist1">
1193 Export tags from Git as p4 labels. Tags found in Git are applied
1194 to the perforce working directory.
1197 <dt class=
"hdlist1">
1200 <dt class=
"hdlist1">
1205 Show just what commits would be submitted to p4; do not change
1209 <dt class=
"hdlist1">
1214 Apply a commit to the p4 workspace, opening, adding and deleting
1215 files in p4 as for a normal submit operation. Do not issue the
1216 final
"p4 submit", but instead print a message about how to
1217 submit manually or revert. This option always stops after the
1218 first (oldest) commit. Git tags are not exported to p4.
1221 <dt class=
"hdlist1">
1226 Instead of submitting create a series of shelved changelists.
1227 After creating each shelve, the relevant files are reverted/deleted.
1228 If you have multiple commits pending multiple shelves will be created.
1231 <dt class=
"hdlist1">
1232 --update-shelve CHANGELIST
1236 Update an existing shelved changelist with this commit. Implies
1237 --shelve. Repeat for multiple shelved changelists.
1240 <dt class=
"hdlist1">
1241 --conflict=(ask|skip|quit)
1245 Conflicts can occur when applying a commit to p4. When this
1246 happens, the default behavior (
"ask") is to prompt whether to
1247 skip this commit and continue, or quit. This option can be used
1248 to bypass the prompt, causing conflicting commits to be automatically
1249 skipped, or to quit trying to apply commits, without prompting.
1252 <dt class=
"hdlist1">
1253 --branch
<branch
>
1257 After submitting, sync this named branch instead of the default
1258 p4/master. See the
"Sync options" section above for more
1262 <dt class=
"hdlist1">
1263 --commit (
<sha1
>|
<sha1
>..
<sha1
>)
1267 Submit only the specified commit or range of commits, instead of the full
1268 list of changes that are in the current Git branch.
1271 <dt class=
"hdlist1">
1276 Disable the automatic rebase after all commits have been successfully
1277 submitted. Can also be set with git-p4.disableRebase.
1280 <dt class=
"hdlist1">
1285 Disable the automatic sync of p4/master from Perforce after commits have
1286 been submitted. Implies --disable-rebase. Can also be set with
1287 git-p4.disableP4Sync. Sync with origin/master still goes ahead if possible.
1295 <h2 id=
"_hooks_for_submit">Hooks for submit
</h2>
1296 <div class=
"sectionbody">
1298 <h3 id=
"_p4_pre_submit">p4-pre-submit
</h3>
1299 <div class=
"paragraph"><p>The
<code>p4-pre-submit
</code> hook is executed if it exists and is executable.
1300 The hook takes no parameters and nothing from standard input. Exiting with
1301 non-zero status from this script prevents
<code>git-p4 submit
</code> from launching.
1302 It can be bypassed with the
<code>--no-verify
</code> command line option.
</p></div>
1303 <div class=
"paragraph"><p>One usage scenario is to run unit tests in the hook.
</p></div>
1306 <h3 id=
"_p4_prepare_changelist">p4-prepare-changelist
</h3>
1307 <div class=
"paragraph"><p>The
<code>p4-prepare-changelist
</code> hook is executed right after preparing
1308 the default changelist message and before the editor is started.
1309 It takes one parameter, the name of the file that contains the
1310 changelist text. Exiting with a non-zero status from the script
1311 will abort the process.
</p></div>
1312 <div class=
"paragraph"><p>The purpose of the hook is to edit the message file in place,
1313 and it is not suppressed by the
<code>--no-verify
</code> option. This hook
1314 is called even if
<code>--prepare-p4-only
</code> is set.
</p></div>
1317 <h3 id=
"_p4_changelist">p4-changelist
</h3>
1318 <div class=
"paragraph"><p>The
<code>p4-changelist
</code> hook is executed after the changelist
1319 message has been edited by the user. It can be bypassed with the
1320 <code>--no-verify
</code> option. It takes a single parameter, the name
1321 of the file that holds the proposed changelist text. Exiting
1322 with a non-zero status causes the command to abort.
</p></div>
1323 <div class=
"paragraph"><p>The hook is allowed to edit the changelist file and can be used
1324 to normalize the text into some project standard format. It can
1325 also be used to refuse the Submit after inspect the message file.
</p></div>
1328 <h3 id=
"_p4_post_changelist">p4-post-changelist
</h3>
1329 <div class=
"paragraph"><p>The
<code>p4-post-changelist
</code> hook is invoked after the submit has
1330 successfully occurred in P4. It takes no parameters and is meant
1331 primarily for notification and cannot affect the outcome of the
1332 git p4 submit action.
</p></div>
1335 <h3 id=
"_rebase_options">Rebase options
</h3>
1336 <div class=
"paragraph"><p>These options can be used to modify
<em>git p4 rebase
</em> behavior.
</p></div>
1337 <div class=
"dlist"><dl>
1338 <dt class=
"hdlist1">
1349 <h3 id=
"_unshelve_options">Unshelve options
</h3>
1350 <div class=
"dlist"><dl>
1351 <dt class=
"hdlist1">
1356 Sets the git refspec against which the shelved P4 changelist is compared.
1357 Defaults to p4/master.
1365 <h2 id=
"_depot_path_syntax">DEPOT PATH SYNTAX
</h2>
1366 <div class=
"sectionbody">
1367 <div class=
"paragraph"><p>The p4 depot path argument to
<em>git p4 sync
</em> and
<em>git p4 clone
</em> can
1368 be one or more space-separated p4 depot paths, with an optional
1369 p4 revision specifier on the end:
</p></div>
1370 <div class=
"dlist"><dl>
1371 <dt class=
"hdlist1">
1372 "//depot/my/project"
1376 Import one commit with all files in the
<em>#head
</em> change under that tree.
1379 <dt class=
"hdlist1">
1380 "//depot/my/project@all"
1384 Import one commit for each change in the history of that depot path.
1387 <dt class=
"hdlist1">
1388 "//depot/my/project@1,6"
1392 Import only changes
1 through
6.
1395 <dt class=
"hdlist1">
1396 "//depot/proj1@all //depot/proj2@all"
1400 Import all changes from both named depot paths into a single
1401 repository. Only files below these directories are included.
1402 There is not a subdirectory in Git for each
"proj1" and
"proj2".
1403 You must use the
<code>--destination
</code> option when specifying more
1404 than one depot path. The revision specifier must be specified
1405 identically on each depot path. If there are files in the
1406 depot paths with the same name, the path with the most recently
1407 updated version of the file is the one that appears in Git.
1411 <div class=
"paragraph"><p>See
<em>p4 help revisions
</em> for the full syntax of p4 revision specifiers.
</p></div>
1415 <h2 id=
"_client_spec">CLIENT SPEC
</h2>
1416 <div class=
"sectionbody">
1417 <div class=
"paragraph"><p>The p4 client specification is maintained with the
<em>p4 client
</em> command
1418 and contains among other fields, a View that specifies how the depot
1419 is mapped into the client repository. The
<em>clone
</em> and
<em>sync
</em> commands
1420 can consult the client spec when given the
<code>--use-client-spec
</code> option or
1421 when the useClientSpec variable is true. After
<em>git p4 clone
</em>, the
1422 useClientSpec variable is automatically set in the repository
1423 configuration file. This allows future
<em>git p4 submit
</em> commands to
1424 work properly; the submit command looks only at the variable and does
1425 not have a command-line option.
</p></div>
1426 <div class=
"paragraph"><p>The full syntax for a p4 view is documented in
<em>p4 help views
</em>.
<em>git p4
</em>
1427 knows only a subset of the view syntax. It understands multi-line
1428 mappings, overlays with
<em>+
</em>, exclusions with
<em>-
</em> and double-quotes
1429 around whitespace. Of the possible wildcards,
<em>git p4
</em> only handles
1430 <em>…</em>, and only when it is at the end of the path.
<em>git p4
</em> will complain
1431 if it encounters an unhandled wildcard.
</p></div>
1432 <div class=
"paragraph"><p>Bugs in the implementation of overlap mappings exist. If multiple depot
1433 paths map through overlays to the same location in the repository,
1434 <em>git p4
</em> can choose the wrong one. This is hard to solve without
1435 dedicating a client spec just for
<em>git p4
</em>.
</p></div>
1436 <div class=
"paragraph"><p>The name of the client can be given to
<em>git p4
</em> in multiple ways. The
1437 variable
<em>git-p4.client
</em> takes precedence if it exists. Otherwise,
1438 normal p4 mechanisms of determining the client are used: environment
1439 variable
<code>P4CLIENT
</code>, a file referenced by
<code>P4CONFIG
</code>, or the local host name.
</p></div>
1443 <h2 id=
"_branch_detection">BRANCH DETECTION
</h2>
1444 <div class=
"sectionbody">
1445 <div class=
"paragraph"><p>P4 does not have the same concept of a branch as Git. Instead,
1446 p4 organizes its content as a directory tree, where by convention
1447 different logical branches are in different locations in the tree.
1448 The
<em>p4 branch
</em> command is used to maintain mappings between
1449 different areas in the tree, and indicate related content.
<em>git p4
</em>
1450 can use these mappings to determine branch relationships.
</p></div>
1451 <div class=
"paragraph"><p>If you have a repository where all the branches of interest exist as
1452 subdirectories of a single depot path, you can use
<code>--detect-branches
</code>
1453 when cloning or syncing to have
<em>git p4
</em> automatically find
1454 subdirectories in p4, and to generate these as branches in Git.
</p></div>
1455 <div class=
"paragraph"><p>For example, if the P4 repository structure is:
</p></div>
1456 <div class=
"listingblock">
1457 <div class=
"content">
1458 <pre><code>//depot/main/...
1459 //depot/branch1/...
</code></pre>
1461 <div class=
"paragraph"><p>And
"p4 branch -o branch1" shows a View line that looks like:
</p></div>
1462 <div class=
"listingblock">
1463 <div class=
"content">
1464 <pre><code>//depot/main/... //depot/branch1/...
</code></pre>
1466 <div class=
"paragraph"><p>Then this
<em>git p4 clone
</em> command:
</p></div>
1467 <div class=
"listingblock">
1468 <div class=
"content">
1469 <pre><code>git p4 clone --detect-branches //depot@all
</code></pre>
1471 <div class=
"paragraph"><p>produces a separate branch in
<em>refs/remotes/p4/
</em> for //depot/main,
1472 called
<em>master
</em>, and one for //depot/branch1 called
<em>depot/branch1
</em>.
</p></div>
1473 <div class=
"paragraph"><p>However, it is not necessary to create branches in p4 to be able to use
1474 them like branches. Because it is difficult to infer branch
1475 relationships automatically, a Git configuration setting
1476 <em>git-p4.branchList
</em> can be used to explicitly identify branch
1477 relationships. It is a list of
"source:destination" pairs, like a
1478 simple p4 branch specification, where the
"source" and
"destination" are
1479 the path elements in the p4 repository. The example above relied on the
1480 presence of the p4 branch. Without p4 branches, the same result will
1481 occur with:
</p></div>
1482 <div class=
"listingblock">
1483 <div class=
"content">
1484 <pre><code>git init depot
1486 git config git-p4.branchList main:branch1
1487 git p4 clone --detect-branches //depot@all .
</code></pre>
1492 <h2 id=
"_performance">PERFORMANCE
</h2>
1493 <div class=
"sectionbody">
1494 <div class=
"paragraph"><p>The fast-import mechanism used by
<em>git p4
</em> creates one pack file for
1495 each invocation of
<em>git p4 sync
</em>. Normally, Git garbage compression
1496 (
<a href=
"git-gc.html">git-gc(
1)
</a>) automatically compresses these to fewer pack files,
1497 but explicit invocation of
<em>git repack -adf
</em> may improve performance.
</p></div>
1501 <h2 id=
"_configuration_variables">CONFIGURATION VARIABLES
</h2>
1502 <div class=
"sectionbody">
1503 <div class=
"paragraph"><p>The following config settings can be used to modify
<em>git p4
</em> behavior.
1504 They all are in the
<em>git-p4
</em> section.
</p></div>
1506 <h3 id=
"_general_variables">General variables
</h3>
1507 <div class=
"dlist"><dl>
1508 <dt class=
"hdlist1">
1513 User specified as an option to all p4 commands, with
<em>-u
<user
></em>.
1514 The environment variable
<code>P4USER
</code> can be used instead.
1517 <dt class=
"hdlist1">
1522 Password specified as an option to all p4 commands, with
1523 <em>-P
<password
></em>.
1524 The environment variable
<code>P4PASS
</code> can be used instead.
1527 <dt class=
"hdlist1">
1532 Port specified as an option to all p4 commands, with
1533 <em>-p
<port
></em>.
1534 The environment variable
<code>P4PORT
</code> can be used instead.
1537 <dt class=
"hdlist1">
1542 Host specified as an option to all p4 commands, with
1543 <em>-h
<host
></em>.
1544 The environment variable
<code>P4HOST
</code> can be used instead.
1547 <dt class=
"hdlist1">
1552 Client specified as an option to all p4 commands, with
1553 <em>-c
<client
></em>, including the client spec.
1556 <dt class=
"hdlist1">
1561 Specifies the number of times to retry a p4 command (notably,
1562 <em>p4 sync
</em>) if the network times out. The default value is
3.
1563 Set the value to
0 to disable retries or if your p4 version
1564 does not support retries (pre
2012.2).
1570 <h3 id=
"_clone_and_sync_variables">Clone and sync variables
</h3>
1571 <div class=
"dlist"><dl>
1572 <dt class=
"hdlist1">
1573 git-p4.syncFromOrigin
1577 Because importing commits from other Git repositories is much faster
1578 than importing them from p4, a mechanism exists to find p4 changes
1579 first in Git remotes. If branches exist under
<em>refs/remote/origin/p4
</em>,
1580 those will be fetched and used when syncing from p4. This
1581 variable can be set to
<em>false
</em> to disable this behavior.
1584 <dt class=
"hdlist1">
1589 One phase in branch detection involves looking at p4 branches
1590 to find new ones to import. By default, all branches are
1591 inspected. This option limits the search to just those owned
1592 by the single user named in the variable.
1595 <dt class=
"hdlist1">
1600 List of branches to be imported when branch detection is
1601 enabled. Each entry should be a pair of branch names separated
1602 by a colon (:). This example declares that both branchA and
1603 branchB were created from main:
1605 <div class=
"listingblock">
1606 <div class=
"content">
1607 <pre><code>git config git-p4.branchList main:branchA
1608 git config --add git-p4.branchList main:branchB
</code></pre>
1611 <dt class=
"hdlist1">
1612 git-p4.ignoredP4Labels
1616 List of p4 labels to ignore. This is built automatically as
1617 unimportable labels are discovered.
1620 <dt class=
"hdlist1">
1625 Import p4 labels into git, as per --import-labels.
1628 <dt class=
"hdlist1">
1629 git-p4.labelImportRegexp
1633 Only p4 labels matching this regular expression will be imported. The
1634 default value is
<em>[a-zA-Z0-
9_\-.]+$
</em>.
1637 <dt class=
"hdlist1">
1638 git-p4.useClientSpec
1642 Specify that the p4 client spec should be used to identify p4
1643 depot paths of interest. This is equivalent to specifying the
1644 option
<code>--use-client-spec
</code>. See the
"CLIENT SPEC" section above.
1645 This variable is a boolean, not the name of a p4 client.
1648 <dt class=
"hdlist1">
1653 Perforce keeps the encoding of a path as given by the originating OS.
1654 Git expects paths encoded as UTF-
8. Use this config to tell git-p4
1655 what encoding Perforce had used for the paths. This encoding is used
1656 to transcode the paths to UTF-
8. As an example, Perforce on Windows
1657 often uses
"cp1252" to encode path names. If this option is passed
1658 into a p4 clone request, it is persisted in the resulting new git
1662 <dt class=
"hdlist1">
1663 git-p4.metadataDecodingStrategy
1667 Perforce keeps the encoding of a changelist descriptions and user
1668 full names as stored by the client on a given OS. The p4v client
1669 uses the OS-local encoding, and so different users can end up storing
1670 different changelist descriptions or user full names in different
1671 encodings, in the same depot.
1672 Git tolerates inconsistent/incorrect encodings in commit messages
1673 and author names, but expects them to be specified in utf-
8.
1674 git-p4 can use three different decoding strategies in handling the
1675 encoding uncertainty in Perforce:
<em>passthrough
</em> simply passes the
1676 original bytes through from Perforce to git, creating usable but
1677 incorrectly-encoded data when the Perforce data is encoded as
1678 anything other than utf-
8.
<em>strict
</em> expects the Perforce data to be
1679 encoded as utf-
8, and fails to import when this is not true.
1680 <em>fallback
</em> attempts to interpret the data as utf-
8, and otherwise
1681 falls back to using a secondary encoding - by default the common
1682 windows encoding
<em>cp-
1252</em> - with upper-range bytes escaped if
1683 decoding with the fallback encoding also fails.
1684 Under python2 the default strategy is
<em>passthrough
</em> for historical
1685 reasons, and under python3 the default is
<em>fallback
</em>.
1686 When
<em>strict
</em> is selected and decoding fails, the error message will
1687 propose changing this config parameter as a workaround. If this
1688 option is passed into a p4 clone request, it is persisted into the
1689 resulting new git repo.
1692 <dt class=
"hdlist1">
1693 git-p4.metadataFallbackEncoding
1697 Specify the fallback encoding to use when decoding Perforce author
1698 names and changelists descriptions using the
<em>fallback
</em> strategy
1699 (see git-p4.metadataDecodingStrategy). The fallback encoding will
1700 only be used when decoding as utf-
8 fails. This option defaults to
1701 cp1252, a common windows encoding. If this option is passed into a
1702 p4 clone request, it is persisted into the resulting new git repo.
1705 <dt class=
"hdlist1">
1706 git-p4.largeFileSystem
1710 Specify the system that is used for large (binary) files. Please note
1711 that large file systems do not support the
<em>git p4 submit
</em> command.
1712 Only Git LFS is implemented right now (see
<a href=
"https://git-lfs.github.com/">https://git-lfs.github.com/
</a>
1713 for more information). Download and install the Git LFS command line
1714 extension to use this option and configure it like this:
1716 <div class=
"listingblock">
1717 <div class=
"content">
1718 <pre><code>git config git-p4.largeFileSystem GitLFS
</code></pre>
1721 <dt class=
"hdlist1">
1722 git-p4.largeFileExtensions
1726 All files matching a file extension in the list will be processed
1727 by the large file system. Do not prefix the extensions with
<em>.
</em>.
1730 <dt class=
"hdlist1">
1731 git-p4.largeFileThreshold
1735 All files with an uncompressed size exceeding the threshold will be
1736 processed by the large file system. By default the threshold is
1737 defined in bytes. Add the suffix k, m, or g to change the unit.
1740 <dt class=
"hdlist1">
1741 git-p4.largeFileCompressedThreshold
1745 All files with a compressed size exceeding the threshold will be
1746 processed by the large file system. This option might slow down
1747 your clone/sync process. By default the threshold is defined in
1748 bytes. Add the suffix k, m, or g to change the unit.
1751 <dt class=
"hdlist1">
1752 git-p4.largeFilePush
1756 Boolean variable which defines if large files are automatically
1760 <dt class=
"hdlist1">
1761 git-p4.keepEmptyCommits
1765 A changelist that contains only excluded files will be imported
1766 as an empty commit if this boolean option is set to true.
1769 <dt class=
"hdlist1">
1774 Map a P4 user to a name and email address in Git. Use a string
1775 with the following format to create a mapping:
1777 <div class=
"listingblock">
1778 <div class=
"content">
1779 <pre><code>git config --add git-p4.mapUser
"p4user = First Last <mail@address.com>"</code></pre>
1781 <div class=
"paragraph"><p>A mapping will override any user information from P4. Mappings for
1782 multiple P4 user can be defined.
</p></div>
1787 <h3 id=
"_submit_variables">Submit variables
</h3>
1788 <div class=
"dlist"><dl>
1789 <dt class=
"hdlist1">
1790 git-p4.detectRenames
1794 Detect renames. See
<a href=
"git-diff.html">git-diff(
1)
</a>. This can be true,
1795 false, or a score as expected by
<em>git diff -M
</em>.
1798 <dt class=
"hdlist1">
1803 Detect copies. See
<a href=
"git-diff.html">git-diff(
1)
</a>. This can be true,
1804 false, or a score as expected by
<em>git diff -C
</em>.
1807 <dt class=
"hdlist1">
1808 git-p4.detectCopiesHarder
1812 Detect copies harder. See
<a href=
"git-diff.html">git-diff(
1)
</a>. A boolean.
1815 <dt class=
"hdlist1">
1820 On submit, re-author changes to reflect the Git author,
1821 regardless of who invokes
<em>git p4 submit
</em>.
1824 <dt class=
"hdlist1">
1825 git-p4.allowMissingP4Users
1829 When
<em>preserveUser
</em> is true,
<em>git p4
</em> normally dies if it
1830 cannot find an author in the p4 user map. This setting
1831 submits the change regardless.
1834 <dt class=
"hdlist1">
1835 git-p4.skipSubmitEdit
1839 The submit process invokes the editor before each p4 change
1840 is submitted. If this setting is true, though, the editing
1844 <dt class=
"hdlist1">
1845 git-p4.skipSubmitEditCheck
1849 After editing the p4 change message,
<em>git p4
</em> makes sure that
1850 the description really was changed by looking at the file
1851 modification time. This option disables that test.
1854 <dt class=
"hdlist1">
1859 By default, any branch can be used as the source for a
<em>git p4
1860 submit
</em> operation. This configuration variable, if set, permits only
1861 the named branches to be used as submit sources. Branch names
1862 must be the short names (no
"refs/heads/"), and should be
1863 separated by commas (
","), with no spaces.
1866 <dt class=
"hdlist1">
1867 git-p4.skipUserNameCheck
1871 If the user running
<em>git p4 submit
</em> does not exist in the p4
1872 user map,
<em>git p4
</em> exits. This option can be used to force
1873 submission regardless.
1876 <dt class=
"hdlist1">
1877 git-p4.attemptRCSCleanup
1881 If enabled,
<em>git p4 submit
</em> will attempt to cleanup RCS keywords
1882 ($Header$, etc). These would otherwise cause merge conflicts and prevent
1883 the submit going ahead. This option should be considered experimental at
1887 <dt class=
"hdlist1">
1892 Export Git tags to p4 labels, as per --export-labels.
1895 <dt class=
"hdlist1">
1896 git-p4.labelExportRegexp
1900 Only p4 labels matching this regular expression will be exported. The
1901 default value is
<em>[a-zA-Z0-
9_\-.]+$
</em>.
1904 <dt class=
"hdlist1">
1909 Specify submit behavior when a conflict with p4 is found, as per
1910 --conflict. The default behavior is
<em>ask
</em>.
1913 <dt class=
"hdlist1">
1914 git-p4.disableRebase
1918 Do not rebase the tree against p4/master following a submit.
1921 <dt class=
"hdlist1">
1922 git-p4.disableP4Sync
1926 Do not sync p4/master with Perforce following a submit. Implies git-p4.disableRebase.
1934 <h2 id=
"_implementation_details">IMPLEMENTATION DETAILS
</h2>
1935 <div class=
"sectionbody">
1936 <div class=
"ulist"><ul>
1939 Changesets from p4 are imported using Git fast-import.
1944 Cloning or syncing does not require a p4 client; file contents are
1945 collected using
<em>p4 print
</em>.
1950 Submitting requires a p4 client, which is not in the same location
1951 as the Git repository. Patches are applied, one at a time, to
1952 this p4 client and submitted from there.
1957 Each commit imported by
<em>git p4
</em> has a line at the end of the log
1958 message indicating the p4 depot location and change number. This
1959 line is used by later
<em>git p4 sync
</em> operations to know which p4
1967 <h2 id=
"_git">GIT
</h2>
1968 <div class=
"sectionbody">
1969 <div class=
"paragraph"><p>Part of the
<a href=
"git.html">git(
1)
</a> suite
</p></div>
1973 <div id=
"footnotes"><hr /></div>
1975 <div id=
"footer-text">
1977 2022-
05-
20 17:
49:
41 PDT