修复 Git 包安装时浅克隆导致非默认分支 checkout 失败的问题#276
Open
xfwangqiang wants to merge 1 commit intoRT-Thread:v1.5.xfrom
Open
修复 Git 包安装时浅克隆导致非默认分支 checkout 失败的问题#276xfwangqiang wants to merge 1 commit intoRT-Thread:v1.5.xfrom
xfwangqiang wants to merge 1 commit intoRT-Thread:v1.5.xfrom
Conversation
问题:install_git_package 函数使用 --depth=1 浅克隆但未指定分支, 导致 VER_SHA 为分支名或非 HEAD SHA 时 checkout 失败。 修复:根据 VER_SHA 类型选择正确的克隆方式: - 分支名/标签名:使用 --branch 参数克隆指定分支 - commit SHA:先克隆后 fetch 指定 SHA 再 checkout Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Author
|
见#275 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题:install_git_package 函数使用 --depth=1 浅克隆但未指定分支,
导致 VER_SHA 为分支名或非 HEAD SHA 时 checkout 失败。
修复:根据 VER_SHA 类型选择正确的克隆方式: