Merge branch 'tb/t0050-maint'
[gitweb.git] / Documentation / git-p4.txt
index 8228f33e3fdf0e6ec9c66dd3f55ad8094dfeb6aa..f70ef9ded2c7e476c60a90f15ef45e650c663bde 100644 (file)
@@ -112,6 +112,11 @@ will be fetched and consulted first during a 'git p4 sync'.  Since
 importing directly from p4 is considerably slower than pulling changes
 from a git remote, this can be useful in a multi-developer environment.
 
+If there are multiple branches, doing 'git p4 sync' will automatically
+use the "BRANCH DETECTION" algorithm to try to partition new changes
+into the right branch.  This can be overridden with the '--branch'
+option to specify just a single branch to update.
+
 
 Rebase
 ~~~~~~
@@ -163,7 +168,7 @@ All commands except clone accept these options.
 --git-dir <dir>::
        Set the 'GIT_DIR' environment variable.  See linkgit:git[1].
 
---verbose::
+--verbose, -v::
        Provide more progress information.
 
 Sync options
@@ -173,9 +178,11 @@ subsequent 'sync' operations.
 
 --branch <branch>::
        Import changes into given branch.  If the branch starts with
-       'refs/', it will be used as is, otherwise the path 'refs/heads/'
-       will be prepended.  The default branch is 'master'.  If used
-       with an initial clone, no HEAD will be checked out.
+       'refs/', it will be used as is.  Otherwise if it does not start
+       with 'p4/', that prefix is added.  The branch is assumed to
+       name a remote tracking, but this can be modified using
+       '--import-local', or by giving a full ref name.  The default
+       branch is 'master'.
 +
 This example imports a new remote "p4/proj2" into an existing
 git repository:
@@ -269,6 +276,29 @@ These options can be used to modify 'git p4 submit' behavior.
        Export tags from git as p4 labels. Tags found in git are applied
        to the perforce working directory.
 
+--dry-run, -n::
+       Show just what commits would be submitted to p4; do not change
+       state in git or p4.
+
+--prepare-p4-only::
+       Apply a commit to the p4 workspace, opening, adding and deleting
+       files in p4 as for a normal submit operation.  Do not issue the
+       final "p4 submit", but instead print a message about how to
+       submit manually or revert.  This option always stops after the
+       first (oldest) commit.  Git tags are not exported to p4.
+
+--conflict=(ask|skip|quit)::
+       Conflicts can occur when applying a commit to p4.  When this
+       happens, the default behavior ("ask") is to prompt whether to
+       skip this commit and continue, or quit.  This option can be used
+       to bypass the prompt, causing conflicting commits to be automatically
+       skipped, or to quit trying to apply commits, without prompting.
+
+--branch <branch>::
+       After submitting, sync this named branch instead of the default
+       p4/master.  See the "Sync options" section above for more
+       information.
+
 Rebase options
 ~~~~~~~~~~~~~~
 These options can be used to modify 'git p4 rebase' behavior.
@@ -376,8 +406,10 @@ the path elements in the p4 repository.  The example above relied on the
 presence of the p4 branch.  Without p4 branches, the same result will
 occur with:
 ----
+git init depot
+cd depot
 git config git-p4.branchList main:branch1
-git p4 clone --detect-branches //depot@all
+git p4 clone --detect-branches //depot@all .
 ----
 
 
@@ -519,6 +551,10 @@ git-p4.labelExportRegexp::
        Only p4 labels matching this regular expression will be exported. The
        default value is '[a-zA-Z0-9_\-.]+$'.
 
+git-p4.conflict::
+       Specify submit behavior when a conflict with p4 is found, as per
+       --conflict.  The default behavior is 'ask'.
+
 IMPLEMENTATION DETAILS
 ----------------------
 * Changesets from p4 are imported using git fast-import.