libgit2 / libgit2/pygit2

What is the "ptr" referencing in push function?

オープン
#912 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

support
主要言語
Python
スター
1.7k
フォーク
408
平均マージ
2日 57分
マージ済み PR(30日)
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'

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. 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

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。