Situation
Trying to migrate 1 "main" and 2 branches from perforce to git. After matching the branches in perforce with the specifications, I tried a typical migration, which led to problems with code duplication.
Problem
When you run "git p4" (either a clone or synchronization), a duplicate of the main branch code is included in the branches, and the branch code is in the directory next to the wizard. I expect to see only branch code in the git staging area.
Customization
#Perforce Repo Structure //depot/main/branches/MAINT_01 //depot/main/branches/MAINT_02 //depot/main/branches/mobile
Migration attempt
Here's how it happened ...
agvscm01.inq.com /git/buildmaster/git 225 % git init Initialized empty Git repository in /git/buildmaster/git/.git/ agvscm01.inq.com /git/buildmaster/git 226 % git p4 sync --detect-branches --use-client-spec //depot/main/ branches@all Importing revision 20482 (88%) Importing new branch branches/MAINT_01 Resuming with change 20482 Importing revision 21137 (96%) Importing new branch branches/mobile Resuming with change 21137 Importing revision 21396 (100%) Updated branches: MAINT_01 MAINT_02 mobile agvscm01.inq.com /git/buildmaster/git 227 % git checkout -b master p4/branches/MAINT_01 Checking out files: 100% (14923/14923), done. Already on 'master' agvscm01.inq.com /git/buildmaster/git 228 % git checkout -b rel_2 p4/branches/MAINT_02 Checking out files: 100% (15142/15142), done. Switched to a new branch 'rel_2' agvscm01.inq.com /git/buildmaster/git 229 % git checkout -b mobile p4/branches/mobile Checking out files: 100% (29960/29960), done. Switched to a new branch 'mobile' agvscm01.inq.com /git/buildmaster/git 233 % git checkout master Switched to branch 'master' agvscm01.inq.com /git/buildmaster/git2 303 % git branch -a * master mobile rel_2 remotes/p4/branches/MAINT_01 remotes/p4/branches/MAINT_02 remotes/p4/branches/mobile
results
agvscm01.inq.com /git/buildmaster/git2 304 % git checkout mobile Checking out files: 100% (15073/15073), done. Switched to branch 'mobile' agvscm01.inq.com /git/buildmaster/git2 305 % ls MAINT_01 mobile agvscm01.inq.com /git/buildmaster/git2 306 %
Please note that MAINT_01 and mobile directories have all the correct history, but at this level you should only see the contents of the mobile device.
Expectations
The directory MAINT_01 should not be specified in the branch of the mobile branch. mobile is a branch of MAINT_01. This is probably something really simple, but I do not see it. In addition, the wizard check includes MAINT_01 as root. The contents of MAINT_01 must be the root of the branch.
agvscm01.inq.com /git/buildmaster/git2_bak 307 % git checkout master Switched to branch 'master' agvscm01.inq.com /git/buildmaster/git2_bak 308 % ls MAINT_01 agvscm01.inq.com /git/buildmaster/git2_bak 309 %
Appreciate any help here.