libgit2 / libgit2/pygit2

pygit2 unable to commit changes

未关闭
#1,099 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
Python
星标
1.7k
派生
408
平均合并
2 天 57 分钟
30 天内合并 PR
7

描述

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

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从 pygit2 1.7.0 中的 repository.create_commit 调用以及报告中所示的 repository.head.get_object() 表达式开始。使用提供的代码片段复现 KeyError,并验证用于获取父提交的预期当前 API。报告的提交操作成功,或根据缺少的 repository、对象类型和版本详细信息缩小问题范围,即视为完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
git, python
领域
devtools
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。