Fix "init" command when check "mono" dir
What does this MR do and why?
What
修复 mono init
时遇到的 does not look like a git-repo repository
问题
$ mono init -u https://jihulab.com/test-mono/root-group.git -b main
Downloading Repo source from https://jihulab.com/gitlab-cn/mono-client
remote: Enumerating objects: 7947, done.
remote: Counting objects: 100% (110/110), done.
remote: Compressing objects: 100% (51/51), done.
remote: Total 7947 (delta 99), reused 59 (delta 59), pack-reused 7837
接收对象中: 100% (7947/7947), 9.10 MiB | 10.63 MiB/s, 完成.
处理 delta 中: 100% (4190/4190), 完成.
fatal: 'https://jihulab.com/gitlab-cn/mono-client' does not look like a git-repo repository, is --repo-url set correctly?
fatal: double check your --repo-rev setting.
fatal: cloning the git-repo repository failed, will remove '.repo/repo'
Why
初始化命令执行时,检测了当前仓库仓库中是否有 repo
文件。它应该检查 mono
而不是 repo
。
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
How to set up and validate locally
按照此步骤安装初始化 mono:https://jihulab.com/gitlab-cn/gitlab/-/issues/3153#note_2612627,会遇到上面提到的报错:https://jihulab.com/gitlab-cn/mono-client/-/merge_requests/5#what 。
手动将 ~/.bin/mono
中的代码应用当前 MR diff 后再执行 init
便不会再报错。
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
由 路志远 编辑于