gpt4 book ai didi

c++ - Qt: init-repository 以 "fatal: Needed a single revision"中止

转载 作者:行者123 更新时间:2023-11-28 05:18:00 24 4
gpt4 key购买 nike

我正在尝试从 git 源构建 Qt5 的修订版 5.9,但更新子模块失败:

git clone https://github.com/qt/qt5.git
cd qt5
git checkout 5.9
./init-repository
...
... lots of submodules being updated successfully
...

fatal: Needed a single revision
Unable to find current revision in submodule path 'qtnetworkauth'
git submodule update --force --no-fetch exited with status 256 at ./init-repository line 198.
Qt::InitRepository::exe(Qt::InitRepository=HASH(0x1fa94b0), "git", "submodule", "update", "--force", "--no-fetch") called at ./init-repository line 429
Qt::InitRepository::git_clone_all_submodules(Qt::InitRepository=HASH(0x1fa94b0), "qt/qt5", 0, "preview", "essential", "addon", "deprecated") called at ./init-repository line 644
Qt::InitRepository::run(Qt::InitRepository=HASH(0x1fa94b0)) called at ./init-repository line 655

看起来 qtnetworkauth 配置有误,但我不知道如何解决。我试图通过删除 .gitmodulesqtdoc 和文件夹本身中的引用来删除 qtnetworkauth 模块,但其他模块失败了。

奇怪的是 - 当我在删除和添加对 qtnetworkauth 的引用后运行 ./init-repository -f 时,我可以看到它被 checkout ,但子模块文件夹仍然存在空:

...
+ git clone --no-checkout https://github.com/qt/qtnetworkauth qtnetworkauth
Cloning into 'qtnetworkauth'...
remote: Counting objects: 283, done.
remote: Compressing objects: 100% (14/14), done.
remote: Total 283 (delta 3), reused 0 (delta 0), pack-reused 269
Receiving objects: 100% (283/283), 200.12 KiB | 0 bytes/s, done.
Resolving deltas: 100% (139/139), done.
Checking connectivity... done.
+ git config commit.template /home/frans/_HOME/0000_android_dev/qt5/.commit-template
+ git config remote.gerrit.url ssh://codereview.qt-project.org/qt/qtnetworkauth
...

我做错了什么?或者,如果它是 Qt 错误 - 我该如何解决它?

最佳答案

您在实际获取所有存储库之前更改分支。这可能会破坏 ./init-repository 脚本中的某些内容。

我已经检查过这个序列是否有效:

git clone git://code.qt.io/qt/qt5.git
cd qt5/
./init-repository
git checkout 5.9
git submodule update

关于c++ - Qt: init-repository 以 "fatal: Needed a single revision"中止,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42197923/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com