ti fs-git clone-git-workspace
将仓库克隆到已挂载的 Filesystem 路径中。数据填充可以同步运行,也可以在后台运行。
语法
ti fs-git clone-git-workspace
--repo-url <string>
--target-path <string>
[--blobless]
[--dry-run]
[--file-system-id <string>]
[--fs-token <string>]
[--help]
[--hydrate <string>]
[--version]
选项
--repo-url <string>:Git 仓库 URL。[必需]--target-path <string>:要克隆到的已挂载文件系统路径。[必需]--blobless:创建无 blob 的部分本地.git,并单独填充干净的 blob。--dry-run:验证请求而不应用更改。--file-system-id <string>:选择文件系统。你也可以设置TI_FS_FILE_SYSTEM_ID。--fs-token <string>:设置 Filesystem 访问令牌。如果省略此选项,命令会使用TI_FS_TOKEN环境变量。如果两者都未提供,命令会使用为所选 Filesystem 在本地存储的令牌。--help:显示帮助信息。--hydrate <string>:干净数据填充模式:auto、background、sync或off。使用auto时,无 blob 克隆会在后台进行填充,而非无 blob 克隆不会运行单独的填充步骤。background和sync需要--blobless;off会跳过填充。[默认值:auto]--version:显示版本信息。
有关所有命令共享的选项,请参见全局选项。
示例
正常克隆一个仓库:
# Create a complete Git checkout in the mounted Filesystem path. ti fs-git clone-git-workspace --file-system-id <file-system-id> --repo-url https://github.com/pingcap/tidb.git --target-path /path/to/workspace/tidb立即启动一个无 blob 工作区:
# Expose the repository tree while clean Git objects hydrate in the background. ti fs-git clone-git-workspace --file-system-id <file-system-id> --repo-url https://github.com/pingcap/tidb.git --target-path /path/to/workspace/tidb --blobless --hydrate background等待无 blob 填充完成:
# Keep the clone command running until clean Git objects finish hydrating. ti fs-git clone-git-workspace --file-system-id <file-system-id> --repo-url https://github.com/pingcap/tidb.git --target-path /path/to/workspace/tidb --blobless --hydrate sync