Pygit2

Latest version: v1.16.0

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

Scan your dependencies

Page 11 of 12

0.21.4

- Fix credentials callback not set when pushing
[431](https://github.com/libgit2/pygit2/pull/431)
[435](https://github.com/libgit2/pygit2/issues/435)
[437](https://github.com/libgit2/pygit2/issues/437)
[438](https://github.com/libgit2/pygit2/pull/438)
- Fix `Repository.diff(...)` when treeish is \"empty\"
[432](https://github.com/libgit2/pygit2/issues/432)
- New `Reference.peel(...)` renders `Reference.get_object()` obsolete
[434](https://github.com/libgit2/pygit2/pull/434)
- New, authenticate using ssh agent
[424](https://github.com/libgit2/pygit2/pull/424)
- New `Repository.merge_commits(...)`
[445](https://github.com/libgit2/pygit2/pull/445)
- Make it easier to run when libgit2 not in a standard location
[441](https://github.com/libgit2/pygit2/issues/441)
- Documentation: review install chapter
- Documentation: many corrections
[427](https://github.com/libgit2/pygit2/pull/427)
[429](https://github.com/libgit2/pygit2/pull/429)
[439](https://github.com/libgit2/pygit2/pull/439)
[440](https://github.com/libgit2/pygit2/pull/440)
[442](https://github.com/libgit2/pygit2/pull/442)
[443](https://github.com/libgit2/pygit2/pull/443)
[444](https://github.com/libgit2/pygit2/pull/444)

0.21.3

Breaking changes:

- Now `Repository.blame(...)` returns `Oid` instead of string
[413](https://github.com/libgit2/pygit2/pull/413)
- New `Reference.set_target(...)` replaces the `Reference.target`
setter and `Reference.log_append(...)`
[414](https://github.com/libgit2/pygit2/pull/414)
- New `Repository.set_head(...)` replaces the `Repository.head` setter
[414](https://github.com/libgit2/pygit2/pull/414)
- `Repository.merge(...)` now uses the `SAFE_CREATE` strategy by
default [417](https://github.com/libgit2/pygit2/pull/417)

Other changes:

- New `Remote.delete()`
[418](https://github.com/libgit2/pygit2/issues/418)
[420](https://github.com/libgit2/pygit2/pull/420)
- New `Repository.write_archive(...)`
[421](https://github.com/libgit2/pygit2/pull/421)
- Now `Repository.checkout(...)` accepts branch objects
[408](https://github.com/libgit2/pygit2/pull/408)
- Fix refcount leak in remotes
[403](https://github.com/libgit2/pygit2/issues/403)
[404](https://github.com/libgit2/pygit2/pull/404)
[419](https://github.com/libgit2/pygit2/pull/419)
- Various fixes to `clone_repository(...)`
[399](https://github.com/libgit2/pygit2/issues/399)
[411](https://github.com/libgit2/pygit2/pull/411)
[425](https://github.com/libgit2/pygit2/issues/425)
[426](https://github.com/libgit2/pygit2/pull/426)
- Fix build error in Python 3
[401](https://github.com/libgit2/pygit2/pull/401)
- Now `pip install pygit2` installs cffi first
[380](https://github.com/libgit2/pygit2/issues/380)
[407](https://github.com/libgit2/pygit2/pull/407)
- Add support for PyPy3
[422](https://github.com/libgit2/pygit2/pull/422)
- Documentation improvements
[398](https://github.com/libgit2/pygit2/pull/398)
[409](https://github.com/libgit2/pygit2/pull/409)

0.21.2

- Fix regression with Python 2, `IndexEntry.path` returns str (bytes
in Python 2 and unicode in Python 3)
- Get back `IndexEntry.oid` for backwards compatibility
- Config, iterate over the keys (instead of the key/value pairs)
[395](https://github.com/libgit2/pygit2/pull/395)
- `Diff.find_similar` supports new threshold arguments
[396](https://github.com/libgit2/pygit2/pull/396)
- Optimization, do not load the object when expanding an oid prefix
[397](https://github.com/libgit2/pygit2/pull/397)

0.21.1

- Install fix [382](https://github.com/libgit2/pygit2/pull/382)
- Documentation improved, including
[383](https://github.com/libgit2/pygit2/pull/383)
[385](https://github.com/libgit2/pygit2/pull/385)
[388](https://github.com/libgit2/pygit2/pull/388)
- Documentation, use the read-the-docs theme
[387](https://github.com/libgit2/pygit2/pull/387)
- Coding style improvements
[392](https://github.com/libgit2/pygit2/pull/392)
- New `Repository.state_cleanup()`
[386](https://github.com/libgit2/pygit2/pull/386)
- New `Index.conflicts`
[345](https://github.com/libgit2/pygit2/issues/345)
[389](https://github.com/libgit2/pygit2/pull/389)
- New checkout option to define the target directory
[390](https://github.com/libgit2/pygit2/pull/390)

Backward incompatible changes:

- Now the checkout strategy must be a keyword argument.

Change `Repository.checkout(refname, strategy)` to
`Repository.checkout(refname, strategy=strategy)`

Idem for `checkout_head`, `checkout_index` and `checkout_tree`

0.21.0

Highlights:

- Drop official support for Python 2.6, and add support for Python 3.4
[376](https://github.com/libgit2/pygit2/pull/376)
- Upgrade to libgit2 v0.21.0
[374](https://github.com/libgit2/pygit2/pull/374)
- Start using cffi [360](https://github.com/libgit2/pygit2/pull/360)
[361](https://github.com/libgit2/pygit2/pull/361)

Backward incompatible changes:

- Replace `oid` by `id` through the API to follow libgit2 conventions.
- Merge API overhaul following changes in libgit2.
- New `Remote.rename(...)` replaces `Remote.name = ...`
- Now `Remote.fetch()` returns a `TransferProgress` object.
- Now `Config.get_multivar(...)` returns an iterator instead of a
list.

New features:

- New `Config.snapshot()` and `Repository.config_snapshot()`
- New `Config` methods: `get_bool(...)`, `get_int(...)`,
`parse_bool(...)` and `parse_int(...)`
[357](https://github.com/libgit2/pygit2/pull/357)
- Blob: implement the memory buffer interface
[362](https://github.com/libgit2/pygit2/pull/362)
- New `clone_into(...)` function
[368](https://github.com/libgit2/pygit2/pull/368)
- Now `Index` can be used alone, without a repository
[372](https://github.com/libgit2/pygit2/pull/372)
- Add more options to `init_repository`
[347](https://github.com/libgit2/pygit2/pull/347)
- Support `Repository.workdir = ...` and support setting detached
heads `Repository.head = <Oid>`
[377](https://github.com/libgit2/pygit2/pull/377)

Other:

- Fix again build with VS2008
[364](https://github.com/libgit2/pygit2/pull/364)
- Fix `Blob.diff(...)` and `Blob.diff_to_buffer(...)` arguments
passing [366](https://github.com/libgit2/pygit2/pull/366)
- Fail gracefully when compiling against the wrong version of libgit2
[365](https://github.com/libgit2/pygit2/pull/365)
- Several documentation improvements and updates
[359](https://github.com/libgit2/pygit2/pull/359)
[375](https://github.com/libgit2/pygit2/pull/375)
[378](https://github.com/libgit2/pygit2/pull/378)

0.20.3

- A number of memory issues fixed
[328](https://github.com/libgit2/pygit2/pull/328)
[348](https://github.com/libgit2/pygit2/pull/348)
[353](https://github.com/libgit2/pygit2/pull/353)
[355](https://github.com/libgit2/pygit2/pull/355)
[356](https://github.com/libgit2/pygit2/pull/356)
- Compatibility fixes for PyPy
([338](https://github.com/libgit2/pygit2/pull/338)), Visual Studio
2008 ([343](https://github.com/libgit2/pygit2/pull/343)) and Python
3.3 ([351](https://github.com/libgit2/pygit2/pull/351))
- Make the sort mode parameter in `Repository.walk(...)` optional
[337](https://github.com/libgit2/pygit2/pull/337)
- New `Object.peel(...)`
[342](https://github.com/libgit2/pygit2/pull/342)
- New `Index.add_all(...)`
[344](https://github.com/libgit2/pygit2/pull/344)
- Introduce support for libgit2 options
[350](https://github.com/libgit2/pygit2/pull/350)
- More informative repr for `Repository` objects
[352](https://github.com/libgit2/pygit2/pull/352)
- Introduce support for credentials
[354](https://github.com/libgit2/pygit2/pull/354)
- Several documentation fixes
[302](https://github.com/libgit2/pygit2/issues/302)
[336](https://github.com/libgit2/pygit2/issues/336)
- Tests, remove temporary files
[341](https://github.com/libgit2/pygit2/pull/341)

Page 11 of 12

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.