Code

git-p4: test and document --use-client-spec
[git.git] / Documentation / git-p4.txt
index 201a0a03c475e06fd7c01f6c213113c9d4b38ab9..9a7cdea0f191050de2dd842f38035073a29fef4d 100644 (file)
@@ -178,7 +178,15 @@ 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'.
+       will be prepended.  The default branch is 'master'.  If used
+       with an initial clone, no HEAD will be checked out.
++
+This example imports a new remote "p4/proj2" into an existing
+git repository:
+----
+    $ git init
+    $ git p4 sync --branch=refs/remotes/p4/proj2 //depot/proj2
+----
 
 --detect-branches::
        Use the branch detection algorithm to find new paths in p4.  It is
@@ -203,7 +211,9 @@ subsequent 'sync' operations.
        By default, p4 branches are stored in 'refs/remotes/p4/',
        where they will be treated as remote-tracking branches by
        linkgit:git-branch[1] and other commands.  This option instead
-       puts p4 branches in 'refs/heads/p4/'.
+       puts p4 branches in 'refs/heads/p4/'.  Note that future
+       sync operations must specify '--import-local' as well so that
+       they can find the p4 branches in refs/heads.
 
 --max-changes <n>::
        Limit the number of imported changes to 'n'.  Useful to
@@ -222,7 +232,10 @@ subsequent 'sync' operations.
        Use a client spec to find the list of interesting files in p4.
        The client spec is discovered using 'p4 client -o' which checks
        the 'P4CLIENT' environment variable and returns a mapping of
-       depot files to workspace files.
+       depot files to workspace files.  Note that a depot path is
+       still required, but files found in the path that match in
+       the client spec view will be laid out according to the client
+       spec.
 
 Clone options
 ~~~~~~~~~~~~~
@@ -276,8 +289,15 @@ p4 revision specifier on the end:
 "//depot/my/project@1,6"::
     Import only changes 1 through 6.
 
-"//depot/proj1 //depot/proj2@all"::
-    Import all changes from both named depot paths.
+"//depot/proj1@all //depot/proj2@all"::
+    Import all changes from both named depot paths into a single
+    repository.  Only files below these directories are included.
+    There is not a subdirectory in git for each "proj1" and "proj2".
+    You must use the '--destination' option when specifying more
+    than one depot path.  The revision specifier must be specified
+    identically on each depot path.  If there are files in the
+    depot paths with the same name, the path with the most recently
+    updated version of the file is the one that appears in git.
 
 See 'p4 help revisions' for the full syntax of p4 revision specifiers.