libgit2 / libgit2/pygit2

What is the "ptr" referencing in push function?

Open
#912 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

support
Dominant language
Python
Stars
1.7k
Forks
408
Avg merge
2d 57m
Merged PRs (30d)
7

Description

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'

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Remote constructor and push API documentation, then compare them with the traceback locations in remote.py line 355 and create.py lines 93-99. Clarify what the ptr parameter represents, how it relates to Remote construction, and document the expected usage so the reported TypeError is understandable.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, python
Domain
api, documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.