diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-01-21 20:15:44 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-01-21 20:15:44 -0800 |
commit | 801cbd7c71bfc61ebd7dd526ccf43282ef887869 (patch) | |
tree | 0fc1ad9b8f0291a829cd7e41e5f29b06361658f5 /Documentation | |
parent | Merge branch 'mh/remote-hg-mode-bits-fix' (diff) | |
parent | git p4: fix submit when no master branch (diff) | |
download | tgif-801cbd7c71bfc61ebd7dd526ccf43282ef887869.tar.xz |
Merge branch 'pw/p4-branch-fixes'
Fix "git p4" around branch handling.
* pw/p4-branch-fixes:
git p4: fix submit when no master branch
git p4 test: keep P4CLIENT changes inside subshells
git p4: fix sync --branch when no master branch
git p4: fail gracefully on sync with no master branch
git p4: rearrange self.initialParent use
git p4: allow short ref names to --branch
git p4 doc: fix branch detection example
git p4: clone --branch should checkout master
git p4: verify expected refs in clone --bare test
git p4: create p4/HEAD on initial clone
git p4: inline listExistingP4GitBranches
git p4: add comments to p4BranchesInGit
git p4: rearrange and simplify hasOrigin handling
git p4: test sync/clone --branch behavior
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/git-p4.txt | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/Documentation/git-p4.txt b/Documentation/git-p4.txt index beff6229c8..f70ef9ded2 100644 --- a/Documentation/git-p4.txt +++ b/Documentation/git-p4.txt @@ -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 ~~~~~~ @@ -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: @@ -287,6 +294,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 +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 . ---- |