What is the "ptr" referencing in push function?
未关闭
还没有人认领这个 Issue。
support
- 主要语言
- Python
- 星标
- 1.7k
- 派生
- 408
- 平均合并
- 2 天 57 分钟
- 30 天内合并 PR
- 7
描述
I am trying to do a git push of a new branch and the function for push requires refspecs and ptr. What is the "ptr" referencing? I don't see any sort of description in the documentation.
Exception ignored in: <bound method Remote.__del__ of <pygit2.remote.Remote object at 0x0000024E6DE8B5C0>>
Traceback (most recent call last):
File "C:\Users\chfortne\AppData\Local\Programs\Python\Python36\lib\site-packages\pygit2\remote.py", line 355, in __del__
C.git_remote_free(self._remote)
AttributeError: 'Remote' object has no attribute '_remote'
Traceback (most recent call last):
File "create.py", line 99, in <module>
repository_push(repo, short_name)
File "create.py", line 93, in repository_push
remote = Remote('./.git')
TypeError: __init__() missing 1 required positional argument: 'ptr'
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
先从 Remote 构造函数和 push API 的文档开始,然后将其与 remote.py 第 355 行以及 create.py 第 93-99 行中的 traceback 位置进行比较。明确 ptr 参数代表什么、它与 Remote 构造之间的关系,并记录预期的用法,以便理解所报告的 TypeError。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- git, python
- 领域
- api, documentation
- Issue 类型
- 文档
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100