Imported Upstream version 1.8.0
[platform/upstream/git.git] / Documentation / git-p4.txt
index cf3a9fd..beff622 100644 (file)
@@ -31,13 +31,6 @@ the updated p4 remote branch.
 
 EXAMPLE
 -------
-* Create an alias for 'git p4', using the full path to the 'git-p4'
-  script if needed:
-+
-------------
-$ git config --global alias.p4 '!git-p4'
-------------
-
 * Clone a repository:
 +
 ------------
@@ -165,11 +158,14 @@ OPTIONS
 
 General options
 ~~~~~~~~~~~~~~~
-All commands except clone accept this option.
+All commands except clone accept these options.
 
 --git-dir <dir>::
        Set the 'GIT_DIR' environment variable.  See linkgit:git[1].
 
+--verbose, -v::
+       Provide more progress information.
+
 Sync options
 ~~~~~~~~~~~~
 These options can be used in the initial 'clone' as well as in
@@ -201,12 +197,13 @@ git repository:
 --silent::
        Do not print any progress information.
 
---verbose::
-       Provide more progress information.
-
 --detect-labels::
        Query p4 for labels associated with the depot paths, and add
-       them as tags in git.
+       them as tags in git. Limited usefulness as only imports labels
+       associated with new changelists. Deprecated.
+
+--import-labels::
+       Import labels from p4 into git.
 
 --import-local::
        By default, p4 branches are stored in 'refs/remotes/p4/',
@@ -253,15 +250,12 @@ Submit options
 ~~~~~~~~~~~~~~
 These options can be used to modify 'git p4 submit' behavior.
 
---verbose::
-       Provide more progress information.
-
 --origin <commit>::
        Upstream location from which commits are identified to submit to
        p4.  By default, this is the most recent p4 commit reachable
        from 'HEAD'.
 
--M[<n>]::
+-M::
        Detect renames.  See linkgit:git-diff[1].  Renames will be
        represented in p4 using explicit 'move' operations.  There
        is no corresponding option to detect copies, but there are
@@ -271,6 +265,34 @@ These options can be used to modify 'git p4 submit' behavior.
        Re-author p4 changes before submitting to p4.  This option
        requires p4 admin privileges.
 
+--export-labels::
+       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.
+
+Rebase options
+~~~~~~~~~~~~~~
+These options can be used to modify 'git p4 rebase' behavior.
+
+--import-labels::
+       Import p4 labels.
 
 DEPOT PATH SYNTAX
 -----------------
@@ -312,19 +334,19 @@ configuration file.  This allows future 'git p4 submit' commands to
 work properly; the submit command looks only at the variable and does
 not have a command-line option.
 
-The full syntax for a p4 view is documented in 'p4 help views'.  Git-p4
+The full syntax for a p4 view is documented in 'p4 help views'.  'Git p4'
 knows only a subset of the view syntax.  It understands multi-line
 mappings, overlays with '+', exclusions with '-' and double-quotes
-around whitespace.  Of the possible wildcards, git-p4 only handles
-'...', and only when it is at the end of the path.  Git-p4 will complain
+around whitespace.  Of the possible wildcards, 'git p4' only handles
+'...', and only when it is at the end of the path.  'Git p4' will complain
 if it encounters an unhandled wildcard.
 
 Bugs in the implementation of overlap mappings exist.  If multiple depot
 paths map through overlays to the same location in the repository,
-git-p4 can choose the wrong one.  This is hard to solve without
-dedicating a client spec just for git-p4.
+'git p4' can choose the wrong one.  This is hard to solve without
+dedicating a client spec just for 'git p4'.
 
-The name of the client can be given to git-p4 in multiple ways.  The
+The name of the client can be given to 'git p4' in multiple ways.  The
 variable 'git-p4.client' takes precedence if it exists.  Otherwise,
 normal p4 mechanisms of determining the client are used:  environment
 variable P4CLIENT, a file referenced by P4CONFIG, or the local host name.
@@ -441,6 +463,17 @@ git config       git-p4.branchList main:branchA
 git config --add git-p4.branchList main:branchB
 -------------
 
+git-p4.ignoredP4Labels::
+       List of p4 labels to ignore. This is built automatically as
+       unimportable labels are discovered.
+
+git-p4.importLabels::
+       Import p4 labels into git, as per --import-labels.
+
+git-p4.labelImportRegexp::
+       Only p4 labels matching this regular expression will be imported. The
+       default value is '[a-zA-Z0-9_\-.]+$'.
+
 git-p4.useClientSpec::
        Specify that the p4 client spec should be used to identify p4
        depot paths of interest.  This is equivalent to specifying the
@@ -450,13 +483,15 @@ git-p4.useClientSpec::
 Submit variables
 ~~~~~~~~~~~~~~~~
 git-p4.detectRenames::
-       Detect renames.  See linkgit:git-diff[1].
+       Detect renames.  See linkgit:git-diff[1].  This can be true,
+       false, or a score as expected by 'git diff -M'.
 
 git-p4.detectCopies::
-       Detect copies.  See linkgit:git-diff[1].
+       Detect copies.  See linkgit:git-diff[1].  This can be true,
+       false, or a score as expected by 'git diff -C'.
 
 git-p4.detectCopiesHarder::
-       Detect copies harder.  See linkgit:git-diff[1].
+       Detect copies harder.  See linkgit:git-diff[1].  A boolean.
 
 git-p4.preserveUser::
        On submit, re-author changes to reflect the git author,
@@ -490,10 +525,21 @@ git-p4.skipUserNameCheck::
        submission regardless.
 
 git-p4.attemptRCSCleanup::
-    If enabled, 'git p4 submit' will attempt to cleanup RCS keywords
-    ($Header$, etc). These would otherwise cause merge conflicts and prevent
-    the submit going ahead. This option should be considered experimental at
-    present.
+       If enabled, 'git p4 submit' will attempt to cleanup RCS keywords
+       ($Header$, etc). These would otherwise cause merge conflicts and prevent
+       the submit going ahead. This option should be considered experimental at
+       present.
+
+git-p4.exportLabels::
+       Export git tags to p4 labels, as per --export-labels.
+
+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
 ----------------------