From 40d69ac3a4fd72b879bab9975b26e1b445b5f0cc Mon Sep 17 00:00:00 2001 From: Pete Wyckoff Date: Mon, 14 Jan 2013 19:47:03 -0500 Subject: git p4: allow short ref names to --branch For a clone or sync, --branch says where the newly imported branch should go, or which existing branch to sync up. It takes an argument, which is currently either something that starts with "refs/", or if not, "refs/heads/p4" is prepended. Putting it in heads seems like a bad default; these should go in remotes/p4/ in most situations. Make that the new default, and be more liberal in the form of the branch name. Signed-off-by: Pete Wyckoff Signed-off-by: Junio C Hamano --- Documentation/git-p4.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'Documentation/git-p4.txt') diff --git a/Documentation/git-p4.txt b/Documentation/git-p4.txt index 7c5230e82c..7bd5c290c4 100644 --- a/Documentation/git-p4.txt +++ b/Documentation/git-p4.txt @@ -173,8 +173,11 @@ subsequent 'sync' operations. --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 'p4/master'. + '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: -- cgit v1.2.3