How to get --detect-branches to work with git-p4?

Posted by Michael Brennan on Stack Overflow See other posts from Stack Overflow or by Michael Brennan
Published on 2010-04-29T14:11:09Z Indexed on 2010/04/29 17:17 UTC
Read the original article Hit count: 543

Filed under:
|
|

My p4 repository has a structure similar to:

//depot/project/branch1
//depot/project/branch2
//depot/project/branch3
... etc

However, when I use git-p4 to clone "project", all 3 branches are not considered as branches and all get cloned into the single master branch.

This is how I'm invoking git-p4:

git-p4 clone --detect-branches //depot/project

I was expecting git-p4 to create a git database for "project" with three branches, and the root of the project would be mapped to the portion of the path after the branch name (for example: if //depot/project/branch1 has a subdirectory called "lib" (//depot/project/branch1/lib) then my local file system should be something like /git_project/lib with 3 git branches).

Is what I'm expecting wrong? Am I invoking git-p4 incorrectly?

© Stack Overflow or respective owner

Related posts about git

Related posts about p4