environment.c: enable core.preloadindex by default
[gitweb.git] / Documentation / git-p4.txt
index 3417cb3f596c6f99177da58e2e0365ee1236c560..6ab5f9497ab353e38c15708443527e1d047d39e8 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,8 @@ All commands except clone accept these options.
 --git-dir <dir>::
        Set the 'GIT_DIR' environment variable.  See linkgit:git[1].
 
---verbose, -v::
+-v::
+--verbose::
        Provide more progress information.
 
 Sync options
@@ -171,11 +177,16 @@ Sync options
 These options can be used in the initial 'clone' as well as in
 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.
+--branch <ref>::
+       Import changes into <ref> instead of refs/remotes/p4/master.
+       If <ref> starts with refs/, it is used as is.  Otherwise, if
+       it does not start with p4/, that prefix is added.
++
+By default a <ref> not starting with refs/ is treated as the
+name of a remote-tracking branch (under refs/remotes/).  This
+behavior can be modified using the --import-local option.
++
+The default <ref> is "master".
 +
 This example imports a new remote "p4/proj2" into an existing
 Git repository:
@@ -269,7 +280,8 @@ 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::
+-n::
+--dry-run::
        Show just what commits would be submitted to p4; do not change
        state in Git or p4.
 
@@ -287,6 +299,11 @@ These options can be used to modify 'git p4 submit' behavior.
        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.
@@ -394,8 +411,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 .
 ----