pygit2 icon indicating copy to clipboard operation
pygit2 copied to clipboard

Python bindings for libgit2

Results 203 pygit2 issues
Sort by recently updated
recently updated
newest added

This exposes libgit2's [`git_repository_hashfile()`](https://libgit2.org/libgit2/#HEAD/group/repository/git_repository_hashfile). `pygit2.hashfile()` already exists, but this lets you hash files using the repository's filters.

Hello, when accessing the `.head` property of a Repository object I am getting the following error: ``` @property def head(self) -> str: """Get a reference to the current HEAD""" >...

Documentation says: > insert(name: str, oid: Oid, attr: FileMode) > Insert or replace an entry in the treebuilder. > > Parameters: > > attr > Available values are FileMode.BLOB, FileMode.BLOB_EXECUTABLE,...

```python repo = pygit2.Repository("xxx-repo") try: repo.notes() except KeyError as e: print(e) ``` get: ``` "reference 'refs/notes/commits' not found" ``` when refs/notes or other note-name not fount, it means note is...

```bash $ git clone -h usage: git clone [] [--] [] ... -b, --branch checkout instead of the remote's HEAD ... --single-branch clone only one branch, HEAD or --branch ```...

code ``` import tempfile import pygit2 import subprocess import shutil import sys print(f"python: {sys.version}") print(f"libgit2: {pygit2.LIBGIT2_VERSION}") print(f"pygit2: {pygit2.__version__}") repodir = tempfile.mkdtemp() repo = pygit2.init_repository(repodir, bare=True) sig = pygit2.Signature('Test User', '[email protected]')...

code ``` import tempfile import pygit2 import subprocess import shutil import sys print(f"python: {sys.version}") print(f"libgit2: {pygit2.LIBGIT2_VERSION}") print(f"pygit2: {pygit2.__version__}") repodir = tempfile.mkdtemp() repo = pygit2.init_repository(repodir, bare=True) sig = pygit2.Signature('Test User', '[email protected]')...

OS: sles15sp6 install python3.12 on the system pip3.12 install pygit2 hits issue below: ``` # pip3.12 install pygit2 copying pygit2/decl/callbacks.h -> build/lib.linux-ppc64le-cpython-312/pygit2/decl copying pygit2/decl/checkout.h -> build/lib.linux-ppc64le-cpython-312/pygit2/decl copying pygit2/decl/clone.h -> build/lib.linux-ppc64le-cpython-312/pygit2/decl...

I use pygit2 with Salt Stack (3007.1 from pypi.org). I upgraded pygit from 1.12.1 to 1.15.1 and got errors in /var/log/salt/master. Downgraded pygit2 to **1.14.1** and now it works. ```...

The addition of https://github.com/libgit2/pygit2/pull/1310 [made my CI fail](https://gitlab.com/gitlabracadabra/gitlabracadabra/-/jobs/8085594991) with the following: ``` gitlabracadabra/gitlab/pygit2.py:84: error: Call to untyped function "UserPass" in typed context [no-untyped-call] gitlabracadabra/gitlab/pygit2.py:86: error: Call to untyped function "UserPass"...