Can not walk over a repository with detached HEAD
未关闭
还没有人认领这个 Issue。
- 主要语言
- Python
- 星标
- 1.7k
- 派生
- 408
- 平均合并
- 2 天 57 分钟
- 30 天内合并 PR
- 7
描述
Subject says it all. Here is the steps to reproduce it:
% git clone --depth 1 <URL>
% git fetch --depth 1 origin <revision hash>
% git checkout FETCH_HEAD
>>> from pygit2 import Repository
>>> repo = Repositoy(<Path to a repo>)
>>> for commit in repo.walk(revision):
... pass
...
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
KeyError: 'object not found - no match for id (0c946642a3608917c3c543355de6426d5b69583b)'
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
使用列出的 clone、fetch 和 checkout 命令重现 detached-HEAD 设置,然后运行 pygit2 Repository.walk 示例。从 repo.walk 入口点开始,跟踪 KeyError 背后的对象查找过程。完成标准是 revision 的遍历能够结束,且不再出现报告的 object-not-found 错误。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- git, python
- 领域
- devtools
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100