pygit2 unable to commit changes
还没有人认领这个 Issue。
评估
调研方向
从 pygit2 1.7.0 中的 repository.create_commit 调用以及报告中所示的 repository.head.get_object() 表达式开始。使用提供的代码片段复现 KeyError,并验证用于获取父提交的预期当前 API。报告的提交操作成功,或根据缺少的 repository、对象类型和版本详细信息缩小问题范围,即视为完成。
由索引模型根据 Issue 内容生成。
描述
pygit2 == 1.7.0
I have been trying to commit changes to repo but unable to do so
snippet
oid = repository.create_commit(<branch_name>, author, commiter, message, tree, [repository.head.get_object().hex])
author and commiter are already defined
looks like get_object. was deprecated in newer version . are there any work arounds in latest version for commiting changes
error >>
KeyError: 'the requested type does not match the type in the ODB'
let know if any more details are needed
- 主要语言
- Python
- 星标
- 1.7k
- 派生
- 408
- 平均合并
- 2 天 57 分钟
- 30 天内合并 PR
- 7
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
libgit2/pygit2 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
-
难度 1/5 1 小时以内 新手友好度 88/100
-
难度 4/5 3-5 天 新手友好度 45/100
-
难度 3/5 1-2 天 新手友好度 48/100
-
难度 3/5 1-2 天 新手友好度 55/100
相似的 Issue
-
enhancement
难度 2/5 1-3 小时 新手友好度 70/100
canonical/paas-charm#368 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
-
tech debt
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 1/5 1 小时以内 新手友好度 90/100
StevenBlack/hosts#3256 ·
-
难度 1/5 1 小时以内 新手友好度 90/100
qualcomm/qai-appbuilder#275 ·