Pygit2

Latest version: v1.16.0

Safety actively analyzes 710445 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 12 of 12

0.20.2

- Support PyPy [209](https://github.com/libgit2/pygit2/issues/209)
[327](https://github.com/libgit2/pygit2/pull/327)
[333](https://github.com/libgit2/pygit2/pull/333)

Repository:

- New `Repository.default_signature`
[310](https://github.com/libgit2/pygit2/pull/310)

Oid:

- New `str(Oid)` deprecates `Oid.hex`
[322](https://github.com/libgit2/pygit2/pull/322)

Object:

- New `Object.id` deprecates `Object.oid`
[322](https://github.com/libgit2/pygit2/pull/322)
- New `TreeEntry.id` deprecates `TreeEntry.oid`
[322](https://github.com/libgit2/pygit2/pull/322)
- New `Blob.diff(...)` and `Blob.diff_to_buffer(...)`
[307](https://github.com/libgit2/pygit2/pull/307)
- New `Commit.tree_id` and `Commit.parent_ids`
[73](https://github.com/libgit2/pygit2/issues/73)
[311](https://github.com/libgit2/pygit2/pull/311)
- New rich comparison between tree entries
[305](https://github.com/libgit2/pygit2/issues/305)
[313](https://github.com/libgit2/pygit2/pull/313)
- Now `Tree.__contains__(key)` supports paths
[306](https://github.com/libgit2/pygit2/issues/306)
[316](https://github.com/libgit2/pygit2/pull/316)

Index:

- Now possible to create `IndexEntry(...)`
[325](https://github.com/libgit2/pygit2/pull/325)
- Now `IndexEntry.path`, `IndexEntry.oid` and `IndexEntry.mode` are
writable [325](https://github.com/libgit2/pygit2/pull/325)
- Now `Index.add(...)` accepts an `IndexEntry` too
[325](https://github.com/libgit2/pygit2/pull/325)
- Now `Index.write_tree(...)` is able to write to a different
repository [325](https://github.com/libgit2/pygit2/pull/325)
- Fix memory leak in `IndexEntry.path` setter
[335](https://github.com/libgit2/pygit2/pull/335)

Config:

- New `Config` iterator replaces `Config.foreach`
[183](https://github.com/libgit2/pygit2/issues/183)
[312](https://github.com/libgit2/pygit2/pull/312)

Remote:

- New type `Refspec`
[314](https://github.com/libgit2/pygit2/pull/314)
- New `Remote.push_url`
[315](https://github.com/libgit2/pygit2/pull/314)
- New `Remote.add_push` and `Remote.add_fetch`
[255](https://github.com/libgit2/pygit2/issues/255)
[318](https://github.com/libgit2/pygit2/pull/318)
- New `Remote.fetch_refspecs` replaces `Remote.get_fetch_refspecs()`
and `Remote.set_fetch_refspecs(...)`
[319](https://github.com/libgit2/pygit2/pull/319)
- New `Remote.push_refspecs` replaces `Remote.get_push_refspecs()` and
`Remote.set_push_refspecs(...)`
[319](https://github.com/libgit2/pygit2/pull/319)
- New `Remote.progress`, `Remote.transfer_progress` and
`Remote.update_tips`
[274](https://github.com/libgit2/pygit2/issues/274)
[324](https://github.com/libgit2/pygit2/pull/324)
- New type `TransferProgress`
[274](https://github.com/libgit2/pygit2/issues/274)
[324](https://github.com/libgit2/pygit2/pull/324)
- Fix refcount leak in `Repository.remotes`
[321](https://github.com/libgit2/pygit2/issues/321)
[332](https://github.com/libgit2/pygit2/pull/332)

Other: [331](https://github.com/libgit2/pygit2/pull/331)

0.20.1

- New remote ref-specs API:
[290](https://github.com/libgit2/pygit2/pull/290)
- New `Repository.reset(...)`:
[292](https://github.com/libgit2/pygit2/pull/292),
[294](https://github.com/libgit2/pygit2/pull/294)
- Export `GIT_DIFF_MINIMAL`:
[293](https://github.com/libgit2/pygit2/pull/293)
- New `Repository.merge(...)`:
[295](https://github.com/libgit2/pygit2/pull/295)
- Fix `Repository.blame` argument handling:
[297](https://github.com/libgit2/pygit2/pull/297)
- Fix build error on Windows:
[298](https://github.com/libgit2/pygit2/pull/298)
- Fix typo in the README file, Blog → Blob:
[301](https://github.com/libgit2/pygit2/pull/301)
- Now `Diff.patch` returns `None` if no patch:
[232](https://github.com/libgit2/pygit2/pull/232),
[303](https://github.com/libgit2/pygit2/pull/303)
- New `Walker.simplify_first_parent()`:
[304](https://github.com/libgit2/pygit2/pull/304)

0.20.0

- Upgrade to libgit2 v0.20.0:
[288](https://github.com/libgit2/pygit2/pull/288)
- New `Repository.head_is_unborn` replaces
`Repository.head_is_orphaned`
- Changed `pygit2.clone_repository(...)`. Drop `push_url`,
`fetch_spec` and `push_spec` parameters. Add `ignore_cert_errors`.
- New `Patch.additions` and `Patch.deletions`:
[275](https://github.com/libgit2/pygit2/pull/275)
- New `Patch.is_binary`:
[276](https://github.com/libgit2/pygit2/pull/276)
- New `Reference.log_append(...)`:
[277](https://github.com/libgit2/pygit2/pull/277)
- New `Blob.is_binary`:
[278](https://github.com/libgit2/pygit2/pull/278)
- New `len(Diff)` shows the number of patches:
[281](https://github.com/libgit2/pygit2/pull/281)
- Rewrite `Repository.status()`:
[283](https://github.com/libgit2/pygit2/pull/283)
- New `Reference.shorthand`:
[284](https://github.com/libgit2/pygit2/pull/284)
- New `Repository.blame(...)`:
[285](https://github.com/libgit2/pygit2/pull/285)
- Now `Repository.listall_references()` and
`Repository.listall_branches()` return a list, not a tuple:
[289](https://github.com/libgit2/pygit2/pull/289)

Page 12 of 12

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.