git p4 名称中的斜线失败

Slashes in git p4 name fails

我正在使用 git p4 将我的 Perforce 存储库转换为 git 存储库。我有很多分支映射,其中一些是循环的(在 Perforce 中很好),一些随着时间的推移而改变,所以它们从 @1 开始不起作用,所以我从 @50000 开始,否则 [=24] =]git p4 在几个步骤中抱怨,因为分支映射不再反映旧的集成。

我创建了一个专用的分支映射,它完美地映射了来自 @50000 的两个分支,只有这两个是我的客户规范视图的一部分。

$ p4 workspace
View:
    //depot/feature/... //my-workspace/feature/...
    //depot/main/... //my-workspace/main/...

$ p4 branch main
View:
    //depot/feature/... //depot/main/...

git p4 运行 几个小时 returns 这样:

$ git p4 clone --detect-branches --use-client-spec --verbose //depot@50000,1000000 .
Importing from //depot@50000,1000000 into .
[...]
Updated branches: feature main
Reading pipe: ['git', 'config', '--bool', 'git-p4.importLabels']
Not checking out any branch, use "git checkout -q -b master <branch>"
executing git config --bool git-p4.useclientspec true

我尝试了各种不同的参数,但目录仍然是空的。知道我做错了什么吗?

你只需要 运行 git checkout:

Not checking out any branch, use "git checkout -q -b master <branch>"

在这种情况下,git p4 clone 不知道您想在本地克隆中创建哪个分支,因此它没有创建任何分支,并且没有分支名称,运行 git checkout 要么。它仍然进行了所有 提交 ,并且大概命名了 p4/masterp4/feature 来标识这两个分支的尖端提交。