pygit2 1.18.1__tar.gz → 1.18.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pygit2-1.18.1 → pygit2-1.18.2}/AUTHORS.md +4 -1
- {pygit2-1.18.1 → pygit2-1.18.2}/CHANGELOG.md +59 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/PKG-INFO +1 -1
- {pygit2-1.18.1 → pygit2-1.18.2}/build.sh +2 -2
- pygit2-1.18.2/mypy.ini +12 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/pygit2/__init__.py +335 -16
- {pygit2-1.18.1 → pygit2-1.18.2}/pygit2/_build.py +4 -4
- pygit2-1.18.2/pygit2/_libgit2/ffi.pyi +368 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/pygit2/_pygit2.pyi +84 -149
- {pygit2-1.18.1 → pygit2-1.18.2}/pygit2/_run.py +3 -2
- {pygit2-1.18.1 → pygit2-1.18.2}/pygit2/blame.py +32 -19
- {pygit2-1.18.1 → pygit2-1.18.2}/pygit2/blob.py +2 -2
- {pygit2-1.18.1 → pygit2-1.18.2}/pygit2/branches.py +25 -15
- {pygit2-1.18.1 → pygit2-1.18.2}/pygit2/callbacks.py +47 -18
- {pygit2-1.18.1 → pygit2-1.18.2}/pygit2/config.py +64 -43
- {pygit2-1.18.1 → pygit2-1.18.2}/pygit2/credentials.py +0 -1
- {pygit2-1.18.1 → pygit2-1.18.2}/pygit2/decl/callbacks.h +5 -0
- pygit2-1.18.2/pygit2/decl/options.h +50 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/pygit2/decl/submodule.h +2 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/pygit2/enums.py +47 -44
- {pygit2-1.18.1 → pygit2-1.18.2}/pygit2/errors.py +4 -3
- {pygit2-1.18.1 → pygit2-1.18.2}/pygit2/ffi.py +4 -1
- {pygit2-1.18.1 → pygit2-1.18.2}/pygit2/filter.py +4 -4
- {pygit2-1.18.1 → pygit2-1.18.2}/pygit2/index.py +38 -27
- pygit2-1.18.2/pygit2/options.py +805 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/pygit2/packbuilder.py +21 -13
- {pygit2-1.18.1 → pygit2-1.18.2}/pygit2/references.py +17 -10
- {pygit2-1.18.1 → pygit2-1.18.2}/pygit2/refspec.py +13 -11
- {pygit2-1.18.1 → pygit2-1.18.2}/pygit2/remotes.py +165 -70
- {pygit2-1.18.1 → pygit2-1.18.2}/pygit2/repository.py +239 -121
- pygit2-1.18.2/pygit2/settings.py +348 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/pygit2/submodules.py +36 -20
- {pygit2-1.18.1 → pygit2-1.18.2}/pygit2/utils.py +67 -19
- {pygit2-1.18.1 → pygit2-1.18.2}/pyproject.toml +4 -1
- {pygit2-1.18.1 → pygit2-1.18.2}/requirements-test.txt +1 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/setup.py +14 -12
- {pygit2-1.18.1 → pygit2-1.18.2}/src/blob.c +1 -1
- {pygit2-1.18.1 → pygit2-1.18.2}/src/pygit2.c +0 -35
- {pygit2-1.18.1 → pygit2-1.18.2}/test/conftest.py +21 -15
- {pygit2-1.18.1 → pygit2-1.18.2}/test/test_apply_diff.py +37 -20
- {pygit2-1.18.1 → pygit2-1.18.2}/test/test_archive.py +7 -6
- {pygit2-1.18.1 → pygit2-1.18.2}/test/test_attributes.py +4 -2
- {pygit2-1.18.1 → pygit2-1.18.2}/test/test_blame.py +13 -16
- {pygit2-1.18.1 → pygit2-1.18.2}/test/test_blob.py +39 -25
- {pygit2-1.18.1 → pygit2-1.18.2}/test/test_branch.py +34 -21
- {pygit2-1.18.1 → pygit2-1.18.2}/test/test_branch_empty.py +29 -18
- {pygit2-1.18.1 → pygit2-1.18.2}/test/test_cherrypick.py +10 -6
- {pygit2-1.18.1 → pygit2-1.18.2}/test/test_commit.py +37 -25
- {pygit2-1.18.1 → pygit2-1.18.2}/test/test_commit_gpg.py +5 -3
- {pygit2-1.18.1 → pygit2-1.18.2}/test/test_commit_trailer.py +9 -3
- {pygit2-1.18.1 → pygit2-1.18.2}/test/test_config.py +18 -17
- {pygit2-1.18.1 → pygit2-1.18.2}/test/test_credentials.py +42 -21
- {pygit2-1.18.1 → pygit2-1.18.2}/test/test_describe.py +14 -13
- {pygit2-1.18.1 → pygit2-1.18.2}/test/test_diff.py +29 -28
- {pygit2-1.18.1 → pygit2-1.18.2}/test/test_diff_binary.py +6 -2
- {pygit2-1.18.1 → pygit2-1.18.2}/test/test_filter.py +33 -16
- {pygit2-1.18.1 → pygit2-1.18.2}/test/test_index.py +36 -33
- {pygit2-1.18.1 → pygit2-1.18.2}/test/test_mailmap.py +3 -4
- {pygit2-1.18.1 → pygit2-1.18.2}/test/test_merge.py +43 -37
- {pygit2-1.18.1 → pygit2-1.18.2}/test/test_nonunicode.py +3 -2
- {pygit2-1.18.1 → pygit2-1.18.2}/test/test_note.py +14 -9
- {pygit2-1.18.1 → pygit2-1.18.2}/test/test_object.py +11 -12
- {pygit2-1.18.1 → pygit2-1.18.2}/test/test_odb.py +10 -9
- {pygit2-1.18.1 → pygit2-1.18.2}/test/test_odb_backend.py +29 -27
- {pygit2-1.18.1 → pygit2-1.18.2}/test/test_oid.py +11 -11
- pygit2-1.18.2/test/test_options.py +262 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/test/test_packbuilder.py +16 -9
- {pygit2-1.18.1 → pygit2-1.18.2}/test/test_patch.py +37 -18
- {pygit2-1.18.1 → pygit2-1.18.2}/test/test_patch_encoding.py +9 -5
- {pygit2-1.18.1 → pygit2-1.18.2}/test/test_refdb_backend.py +45 -31
- {pygit2-1.18.1 → pygit2-1.18.2}/test/test_refs.py +81 -50
- {pygit2-1.18.1 → pygit2-1.18.2}/test/test_remote.py +99 -14
- {pygit2-1.18.1 → pygit2-1.18.2}/test/test_remote_prune.py +12 -6
- {pygit2-1.18.1 → pygit2-1.18.2}/test/test_remote_utf8.py +8 -3
- {pygit2-1.18.1 → pygit2-1.18.2}/test/test_repository.py +179 -114
- {pygit2-1.18.1 → pygit2-1.18.2}/test/test_repository_bare.py +39 -31
- {pygit2-1.18.1 → pygit2-1.18.2}/test/test_repository_custom.py +6 -3
- {pygit2-1.18.1 → pygit2-1.18.2}/test/test_repository_empty.py +5 -3
- {pygit2-1.18.1 → pygit2-1.18.2}/test/test_revparse.py +10 -9
- {pygit2-1.18.1 → pygit2-1.18.2}/test/test_revwalk.py +11 -11
- pygit2-1.18.2/test/test_settings.py +284 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/test/test_signature.py +8 -7
- {pygit2-1.18.1 → pygit2-1.18.2}/test/test_status.py +9 -4
- {pygit2-1.18.1 → pygit2-1.18.2}/test/test_submodule.py +42 -28
- {pygit2-1.18.1 → pygit2-1.18.2}/test/test_tag.py +11 -8
- {pygit2-1.18.1 → pygit2-1.18.2}/test/test_tree.py +37 -25
- {pygit2-1.18.1 → pygit2-1.18.2}/test/test_treebuilder.py +9 -4
- {pygit2-1.18.1 → pygit2-1.18.2}/test/utils.py +30 -9
- pygit2-1.18.1/pygit2/settings.py +0 -193
- pygit2-1.18.1/src/options.c +0 -309
- pygit2-1.18.1/src/options.h +0 -72
- pygit2-1.18.1/test/test_options.py +0 -132
- {pygit2-1.18.1 → pygit2-1.18.2}/COPYING +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/Makefile +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/README.md +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/SPONSORS.md +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/build_tag.py +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/mypy-stubtest.ini +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/pygit2/decl/attr.h +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/pygit2/decl/blame.h +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/pygit2/decl/buffer.h +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/pygit2/decl/checkout.h +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/pygit2/decl/clone.h +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/pygit2/decl/commit.h +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/pygit2/decl/common.h +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/pygit2/decl/config.h +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/pygit2/decl/describe.h +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/pygit2/decl/diff.h +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/pygit2/decl/errors.h +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/pygit2/decl/graph.h +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/pygit2/decl/index.h +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/pygit2/decl/indexer.h +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/pygit2/decl/merge.h +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/pygit2/decl/net.h +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/pygit2/decl/oid.h +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/pygit2/decl/pack.h +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/pygit2/decl/proxy.h +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/pygit2/decl/refspec.h +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/pygit2/decl/remote.h +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/pygit2/decl/repository.h +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/pygit2/decl/revert.h +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/pygit2/decl/stash.h +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/pygit2/decl/strarray.h +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/pygit2/decl/transport.h +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/pygit2/decl/types.h +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/pygit2/legacyenums.py +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/pygit2/py.typed +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/pytest.ini +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/requirements.txt +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/setup.cfg +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/src/branch.c +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/src/branch.h +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/src/commit.c +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/src/diff.c +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/src/diff.h +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/src/error.c +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/src/error.h +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/src/filter.c +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/src/filter.h +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/src/mailmap.c +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/src/mailmap.h +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/src/note.c +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/src/note.h +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/src/object.c +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/src/object.h +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/src/odb.c +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/src/odb.h +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/src/odb_backend.c +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/src/odb_backend.h +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/src/oid.c +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/src/oid.h +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/src/patch.c +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/src/patch.h +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/src/refdb.c +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/src/refdb.h +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/src/refdb_backend.c +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/src/refdb_backend.h +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/src/reference.c +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/src/reference.h +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/src/repository.c +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/src/repository.h +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/src/revspec.c +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/src/revspec.h +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/src/signature.c +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/src/signature.h +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/src/stash.c +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/src/tag.c +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/src/tree.c +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/src/tree.h +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/src/treebuilder.c +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/src/treebuilder.h +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/src/types.h +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/src/utils.c +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/src/utils.h +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/src/walker.c +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/src/walker.h +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/src/wildmatch.c +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/src/wildmatch.h +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/src/worktree.c +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/src/worktree.h +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/test/__init__.py +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/test/data/barerepo.zip +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/test/data/binaryfilerepo.zip +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/test/data/blameflagsrepo.zip +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/test/data/dirtyrepo.zip +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/test/data/emptyrepo.zip +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/test/data/encoding.zip +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/test/data/gpgsigned.zip +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/test/data/submodulerepo.zip +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/test/data/testrepo.zip +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/test/data/testrepoformerging.zip +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/test/data/testrepopacked.zip +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/test/data/trailerrepo.zip +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/test/data/utf8branchrepo.zip +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/test/keys/pygit2_empty +0 -0
- {pygit2-1.18.1 → pygit2-1.18.2}/test/keys/pygit2_empty.pub +0 -0
|
@@ -4,6 +4,7 @@ Authors:
|
|
|
4
4
|
Carlos Martín Nieto
|
|
5
5
|
Nico von Geyso
|
|
6
6
|
Iliyas Jorio
|
|
7
|
+
Benedikt Seidl
|
|
7
8
|
Sviatoslav Sydorenko
|
|
8
9
|
Matthias Bartelmeß
|
|
9
10
|
Robert Coup
|
|
@@ -16,10 +17,10 @@ Authors:
|
|
|
16
17
|
Richo Healey
|
|
17
18
|
Christian Boos
|
|
18
19
|
Julien Miotte
|
|
19
|
-
Benedikt Seidl
|
|
20
20
|
Nick Hynes
|
|
21
21
|
Richard Möhn
|
|
22
22
|
Xu Tao
|
|
23
|
+
Konstantin Baikov
|
|
23
24
|
Matthew Duggan
|
|
24
25
|
Matthew Gamble
|
|
25
26
|
Jeremy Westwood
|
|
@@ -28,6 +29,7 @@ Authors:
|
|
|
28
29
|
Sriram Raghu
|
|
29
30
|
Victor Garcia
|
|
30
31
|
Yonggang Luo
|
|
32
|
+
Łukasz Langa
|
|
31
33
|
Patrick Steinhardt
|
|
32
34
|
Petr Hosek
|
|
33
35
|
Tamir Bahar
|
|
@@ -202,6 +204,7 @@ Authors:
|
|
|
202
204
|
Maxwell G
|
|
203
205
|
Michał Górny
|
|
204
206
|
Na'aman Hirschfeld
|
|
207
|
+
Nicolas Rybowski
|
|
205
208
|
Nicolás Sanguinetti
|
|
206
209
|
Nikita Kartashov
|
|
207
210
|
Nikolai Zujev
|
|
@@ -1,3 +1,62 @@
|
|
|
1
|
+
# 1.18.2 (2025-08-16)
|
|
2
|
+
|
|
3
|
+
- Add support for almost all global options
|
|
4
|
+
[#1409](https://github.com/libgit2/pygit2/pull/1409)
|
|
5
|
+
|
|
6
|
+
- Now it's possible to set `Submodule.url = url`
|
|
7
|
+
[#1395](https://github.com/libgit2/pygit2/pull/1395)
|
|
8
|
+
|
|
9
|
+
- New `RemoteCallbacks.push_negotiation(...)`
|
|
10
|
+
[#1396](https://github.com/libgit2/pygit2/pull/1396)
|
|
11
|
+
|
|
12
|
+
- New optional boolean argument `connect` in `Remote.ls_remotes(...)`
|
|
13
|
+
[#1396](https://github.com/libgit2/pygit2/pull/1396)
|
|
14
|
+
|
|
15
|
+
- New `Remote.list_heads(...)` returns a list of `RemoteHead` objects
|
|
16
|
+
[#1397](https://github.com/libgit2/pygit2/pull/1397)
|
|
17
|
+
[#1410](https://github.com/libgit2/pygit2/pull/1410)
|
|
18
|
+
|
|
19
|
+
- Documentation fixes
|
|
20
|
+
[#1388](https://github.com/libgit2/pygit2/pull/1388)
|
|
21
|
+
|
|
22
|
+
- Typing improvements
|
|
23
|
+
[#1387](https://github.com/libgit2/pygit2/pull/1387)
|
|
24
|
+
[#1389](https://github.com/libgit2/pygit2/pull/1389)
|
|
25
|
+
[#1390](https://github.com/libgit2/pygit2/pull/1390)
|
|
26
|
+
[#1391](https://github.com/libgit2/pygit2/pull/1391)
|
|
27
|
+
[#1392](https://github.com/libgit2/pygit2/pull/1392)
|
|
28
|
+
[#1393](https://github.com/libgit2/pygit2/pull/1393)
|
|
29
|
+
[#1394](https://github.com/libgit2/pygit2/pull/1394)
|
|
30
|
+
[#1398](https://github.com/libgit2/pygit2/pull/1398)
|
|
31
|
+
[#1399](https://github.com/libgit2/pygit2/pull/1399)
|
|
32
|
+
[#1400](https://github.com/libgit2/pygit2/pull/1400)
|
|
33
|
+
[#1402](https://github.com/libgit2/pygit2/pull/1402)
|
|
34
|
+
[#1403](https://github.com/libgit2/pygit2/pull/1403)
|
|
35
|
+
[#1406](https://github.com/libgit2/pygit2/pull/1406)
|
|
36
|
+
[#1407](https://github.com/libgit2/pygit2/pull/1407)
|
|
37
|
+
[#1408](https://github.com/libgit2/pygit2/pull/1408)
|
|
38
|
+
|
|
39
|
+
Deprecations:
|
|
40
|
+
|
|
41
|
+
- `Remote.ls_remotes(...)` is deprecated, use `Remote.list_heads(...)`:
|
|
42
|
+
|
|
43
|
+
# Before
|
|
44
|
+
for head in remote.ls_remotes():
|
|
45
|
+
head['name']
|
|
46
|
+
head['oid']
|
|
47
|
+
head['loid'] # None when local is False
|
|
48
|
+
head['local']
|
|
49
|
+
head['symref_target']
|
|
50
|
+
|
|
51
|
+
# Now
|
|
52
|
+
for head in remote.list_heads():
|
|
53
|
+
head.name
|
|
54
|
+
head.oid
|
|
55
|
+
head.loid # The zero oid when local is False
|
|
56
|
+
head.local
|
|
57
|
+
head.symref_target
|
|
58
|
+
|
|
59
|
+
|
|
1
60
|
# 1.18.1 (2025-07-26)
|
|
2
61
|
|
|
3
62
|
- Update wheels to libgit2 1.9.1 and OpenSSL 3.3
|
|
@@ -178,7 +178,7 @@ if [ -n "$LIBGIT2_VERSION" ]; then
|
|
|
178
178
|
wget https://github.com/libgit2/libgit2/archive/refs/tags/v$LIBGIT2_VERSION.tar.gz -N -O $FILENAME.tar.gz
|
|
179
179
|
tar xf $FILENAME.tar.gz
|
|
180
180
|
cd $FILENAME
|
|
181
|
-
mkdir
|
|
181
|
+
mkdir -p build
|
|
182
182
|
cd build
|
|
183
183
|
if [ "$KERNEL" = "Darwin" ] && [ "$CIBUILDWHEEL" = "1" ]; then
|
|
184
184
|
CMAKE_PREFIX_PATH=$OPENSSL_PREFIX:$PREFIX cmake .. \
|
|
@@ -269,7 +269,7 @@ if [ "$1" = "mypy" ]; then
|
|
|
269
269
|
$PREFIX/bin/pip install $WHEELDIR/pygit2*-$PYTHON_TAG-*.whl
|
|
270
270
|
fi
|
|
271
271
|
$PREFIX/bin/pip install -r requirements-test.txt
|
|
272
|
-
$PREFIX/bin/mypy pygit2
|
|
272
|
+
$PREFIX/bin/mypy pygit2 test
|
|
273
273
|
fi
|
|
274
274
|
|
|
275
275
|
# Test .pyi stub file
|
pygit2-1.18.2/mypy.ini
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
[mypy]
|
|
2
|
+
|
|
3
|
+
warn_unused_configs = True
|
|
4
|
+
warn_redundant_casts = True
|
|
5
|
+
warn_unused_ignores = True
|
|
6
|
+
no_implicit_reexport = True
|
|
7
|
+
disallow_subclassing_any = True
|
|
8
|
+
disallow_untyped_decorators = True
|
|
9
|
+
|
|
10
|
+
[mypy-test.*]
|
|
11
|
+
disallow_untyped_defs = True
|
|
12
|
+
disallow_untyped_calls = True
|
|
@@ -30,29 +30,337 @@ import functools
|
|
|
30
30
|
import os
|
|
31
31
|
import typing
|
|
32
32
|
|
|
33
|
-
# Low level API
|
|
34
|
-
from ._pygit2 import *
|
|
35
|
-
from ._pygit2 import _cache_enums
|
|
36
|
-
|
|
37
33
|
# High level API
|
|
38
34
|
from . import enums
|
|
39
35
|
from ._build import __version__
|
|
36
|
+
|
|
37
|
+
# Low level API
|
|
38
|
+
from ._pygit2 import (
|
|
39
|
+
GIT_APPLY_LOCATION_BOTH,
|
|
40
|
+
GIT_APPLY_LOCATION_INDEX,
|
|
41
|
+
GIT_APPLY_LOCATION_WORKDIR,
|
|
42
|
+
GIT_BLAME_FIRST_PARENT,
|
|
43
|
+
GIT_BLAME_IGNORE_WHITESPACE,
|
|
44
|
+
GIT_BLAME_NORMAL,
|
|
45
|
+
GIT_BLAME_TRACK_COPIES_ANY_COMMIT_COPIES,
|
|
46
|
+
GIT_BLAME_TRACK_COPIES_SAME_COMMIT_COPIES,
|
|
47
|
+
GIT_BLAME_TRACK_COPIES_SAME_COMMIT_MOVES,
|
|
48
|
+
GIT_BLAME_TRACK_COPIES_SAME_FILE,
|
|
49
|
+
GIT_BLAME_USE_MAILMAP,
|
|
50
|
+
GIT_BLOB_FILTER_ATTRIBUTES_FROM_COMMIT,
|
|
51
|
+
GIT_BLOB_FILTER_ATTRIBUTES_FROM_HEAD,
|
|
52
|
+
GIT_BLOB_FILTER_CHECK_FOR_BINARY,
|
|
53
|
+
GIT_BLOB_FILTER_NO_SYSTEM_ATTRIBUTES,
|
|
54
|
+
GIT_BRANCH_ALL,
|
|
55
|
+
GIT_BRANCH_LOCAL,
|
|
56
|
+
GIT_BRANCH_REMOTE,
|
|
57
|
+
GIT_CHECKOUT_ALLOW_CONFLICTS,
|
|
58
|
+
GIT_CHECKOUT_CONFLICT_STYLE_DIFF3,
|
|
59
|
+
GIT_CHECKOUT_CONFLICT_STYLE_MERGE,
|
|
60
|
+
GIT_CHECKOUT_CONFLICT_STYLE_ZDIFF3,
|
|
61
|
+
GIT_CHECKOUT_DISABLE_PATHSPEC_MATCH,
|
|
62
|
+
GIT_CHECKOUT_DONT_OVERWRITE_IGNORED,
|
|
63
|
+
GIT_CHECKOUT_DONT_REMOVE_EXISTING,
|
|
64
|
+
GIT_CHECKOUT_DONT_UPDATE_INDEX,
|
|
65
|
+
GIT_CHECKOUT_DONT_WRITE_INDEX,
|
|
66
|
+
GIT_CHECKOUT_DRY_RUN,
|
|
67
|
+
GIT_CHECKOUT_FORCE,
|
|
68
|
+
GIT_CHECKOUT_NO_REFRESH,
|
|
69
|
+
GIT_CHECKOUT_NONE,
|
|
70
|
+
GIT_CHECKOUT_RECREATE_MISSING,
|
|
71
|
+
GIT_CHECKOUT_REMOVE_IGNORED,
|
|
72
|
+
GIT_CHECKOUT_REMOVE_UNTRACKED,
|
|
73
|
+
GIT_CHECKOUT_SAFE,
|
|
74
|
+
GIT_CHECKOUT_SKIP_LOCKED_DIRECTORIES,
|
|
75
|
+
GIT_CHECKOUT_SKIP_UNMERGED,
|
|
76
|
+
GIT_CHECKOUT_UPDATE_ONLY,
|
|
77
|
+
GIT_CHECKOUT_USE_OURS,
|
|
78
|
+
GIT_CHECKOUT_USE_THEIRS,
|
|
79
|
+
GIT_CONFIG_HIGHEST_LEVEL,
|
|
80
|
+
GIT_CONFIG_LEVEL_APP,
|
|
81
|
+
GIT_CONFIG_LEVEL_GLOBAL,
|
|
82
|
+
GIT_CONFIG_LEVEL_LOCAL,
|
|
83
|
+
GIT_CONFIG_LEVEL_PROGRAMDATA,
|
|
84
|
+
GIT_CONFIG_LEVEL_SYSTEM,
|
|
85
|
+
GIT_CONFIG_LEVEL_WORKTREE,
|
|
86
|
+
GIT_CONFIG_LEVEL_XDG,
|
|
87
|
+
GIT_DELTA_ADDED,
|
|
88
|
+
GIT_DELTA_CONFLICTED,
|
|
89
|
+
GIT_DELTA_COPIED,
|
|
90
|
+
GIT_DELTA_DELETED,
|
|
91
|
+
GIT_DELTA_IGNORED,
|
|
92
|
+
GIT_DELTA_MODIFIED,
|
|
93
|
+
GIT_DELTA_RENAMED,
|
|
94
|
+
GIT_DELTA_TYPECHANGE,
|
|
95
|
+
GIT_DELTA_UNMODIFIED,
|
|
96
|
+
GIT_DELTA_UNREADABLE,
|
|
97
|
+
GIT_DELTA_UNTRACKED,
|
|
98
|
+
GIT_DESCRIBE_ALL,
|
|
99
|
+
GIT_DESCRIBE_DEFAULT,
|
|
100
|
+
GIT_DESCRIBE_TAGS,
|
|
101
|
+
GIT_DIFF_BREAK_REWRITES,
|
|
102
|
+
GIT_DIFF_BREAK_REWRITES_FOR_RENAMES_ONLY,
|
|
103
|
+
GIT_DIFF_DISABLE_PATHSPEC_MATCH,
|
|
104
|
+
GIT_DIFF_ENABLE_FAST_UNTRACKED_DIRS,
|
|
105
|
+
GIT_DIFF_FIND_ALL,
|
|
106
|
+
GIT_DIFF_FIND_AND_BREAK_REWRITES,
|
|
107
|
+
GIT_DIFF_FIND_BY_CONFIG,
|
|
108
|
+
GIT_DIFF_FIND_COPIES,
|
|
109
|
+
GIT_DIFF_FIND_COPIES_FROM_UNMODIFIED,
|
|
110
|
+
GIT_DIFF_FIND_DONT_IGNORE_WHITESPACE,
|
|
111
|
+
GIT_DIFF_FIND_EXACT_MATCH_ONLY,
|
|
112
|
+
GIT_DIFF_FIND_FOR_UNTRACKED,
|
|
113
|
+
GIT_DIFF_FIND_IGNORE_LEADING_WHITESPACE,
|
|
114
|
+
GIT_DIFF_FIND_IGNORE_WHITESPACE,
|
|
115
|
+
GIT_DIFF_FIND_REMOVE_UNMODIFIED,
|
|
116
|
+
GIT_DIFF_FIND_RENAMES,
|
|
117
|
+
GIT_DIFF_FIND_RENAMES_FROM_REWRITES,
|
|
118
|
+
GIT_DIFF_FIND_REWRITES,
|
|
119
|
+
GIT_DIFF_FLAG_BINARY,
|
|
120
|
+
GIT_DIFF_FLAG_EXISTS,
|
|
121
|
+
GIT_DIFF_FLAG_NOT_BINARY,
|
|
122
|
+
GIT_DIFF_FLAG_VALID_ID,
|
|
123
|
+
GIT_DIFF_FLAG_VALID_SIZE,
|
|
124
|
+
GIT_DIFF_FORCE_BINARY,
|
|
125
|
+
GIT_DIFF_FORCE_TEXT,
|
|
126
|
+
GIT_DIFF_IGNORE_BLANK_LINES,
|
|
127
|
+
GIT_DIFF_IGNORE_CASE,
|
|
128
|
+
GIT_DIFF_IGNORE_FILEMODE,
|
|
129
|
+
GIT_DIFF_IGNORE_SUBMODULES,
|
|
130
|
+
GIT_DIFF_IGNORE_WHITESPACE,
|
|
131
|
+
GIT_DIFF_IGNORE_WHITESPACE_CHANGE,
|
|
132
|
+
GIT_DIFF_IGNORE_WHITESPACE_EOL,
|
|
133
|
+
GIT_DIFF_INCLUDE_CASECHANGE,
|
|
134
|
+
GIT_DIFF_INCLUDE_IGNORED,
|
|
135
|
+
GIT_DIFF_INCLUDE_TYPECHANGE,
|
|
136
|
+
GIT_DIFF_INCLUDE_TYPECHANGE_TREES,
|
|
137
|
+
GIT_DIFF_INCLUDE_UNMODIFIED,
|
|
138
|
+
GIT_DIFF_INCLUDE_UNREADABLE,
|
|
139
|
+
GIT_DIFF_INCLUDE_UNREADABLE_AS_UNTRACKED,
|
|
140
|
+
GIT_DIFF_INCLUDE_UNTRACKED,
|
|
141
|
+
GIT_DIFF_INDENT_HEURISTIC,
|
|
142
|
+
GIT_DIFF_MINIMAL,
|
|
143
|
+
GIT_DIFF_NORMAL,
|
|
144
|
+
GIT_DIFF_PATIENCE,
|
|
145
|
+
GIT_DIFF_RECURSE_IGNORED_DIRS,
|
|
146
|
+
GIT_DIFF_RECURSE_UNTRACKED_DIRS,
|
|
147
|
+
GIT_DIFF_REVERSE,
|
|
148
|
+
GIT_DIFF_SHOW_BINARY,
|
|
149
|
+
GIT_DIFF_SHOW_UNMODIFIED,
|
|
150
|
+
GIT_DIFF_SHOW_UNTRACKED_CONTENT,
|
|
151
|
+
GIT_DIFF_SKIP_BINARY_CHECK,
|
|
152
|
+
GIT_DIFF_STATS_FULL,
|
|
153
|
+
GIT_DIFF_STATS_INCLUDE_SUMMARY,
|
|
154
|
+
GIT_DIFF_STATS_NONE,
|
|
155
|
+
GIT_DIFF_STATS_NUMBER,
|
|
156
|
+
GIT_DIFF_STATS_SHORT,
|
|
157
|
+
GIT_DIFF_UPDATE_INDEX,
|
|
158
|
+
GIT_FILEMODE_BLOB,
|
|
159
|
+
GIT_FILEMODE_BLOB_EXECUTABLE,
|
|
160
|
+
GIT_FILEMODE_COMMIT,
|
|
161
|
+
GIT_FILEMODE_LINK,
|
|
162
|
+
GIT_FILEMODE_TREE,
|
|
163
|
+
GIT_FILEMODE_UNREADABLE,
|
|
164
|
+
GIT_FILTER_ALLOW_UNSAFE,
|
|
165
|
+
GIT_FILTER_ATTRIBUTES_FROM_COMMIT,
|
|
166
|
+
GIT_FILTER_ATTRIBUTES_FROM_HEAD,
|
|
167
|
+
GIT_FILTER_CLEAN,
|
|
168
|
+
GIT_FILTER_DEFAULT,
|
|
169
|
+
GIT_FILTER_DRIVER_PRIORITY,
|
|
170
|
+
GIT_FILTER_NO_SYSTEM_ATTRIBUTES,
|
|
171
|
+
GIT_FILTER_SMUDGE,
|
|
172
|
+
GIT_FILTER_TO_ODB,
|
|
173
|
+
GIT_FILTER_TO_WORKTREE,
|
|
174
|
+
GIT_MERGE_ANALYSIS_FASTFORWARD,
|
|
175
|
+
GIT_MERGE_ANALYSIS_NONE,
|
|
176
|
+
GIT_MERGE_ANALYSIS_NORMAL,
|
|
177
|
+
GIT_MERGE_ANALYSIS_UNBORN,
|
|
178
|
+
GIT_MERGE_ANALYSIS_UP_TO_DATE,
|
|
179
|
+
GIT_MERGE_PREFERENCE_FASTFORWARD_ONLY,
|
|
180
|
+
GIT_MERGE_PREFERENCE_NO_FASTFORWARD,
|
|
181
|
+
GIT_MERGE_PREFERENCE_NONE,
|
|
182
|
+
GIT_OBJECT_ANY,
|
|
183
|
+
GIT_OBJECT_BLOB,
|
|
184
|
+
GIT_OBJECT_COMMIT,
|
|
185
|
+
GIT_OBJECT_INVALID,
|
|
186
|
+
GIT_OBJECT_OFS_DELTA,
|
|
187
|
+
GIT_OBJECT_REF_DELTA,
|
|
188
|
+
GIT_OBJECT_TAG,
|
|
189
|
+
GIT_OBJECT_TREE,
|
|
190
|
+
GIT_OID_HEX_ZERO,
|
|
191
|
+
GIT_OID_HEXSZ,
|
|
192
|
+
GIT_OID_MINPREFIXLEN,
|
|
193
|
+
GIT_OID_RAWSZ,
|
|
194
|
+
GIT_REFERENCES_ALL,
|
|
195
|
+
GIT_REFERENCES_BRANCHES,
|
|
196
|
+
GIT_REFERENCES_TAGS,
|
|
197
|
+
GIT_RESET_HARD,
|
|
198
|
+
GIT_RESET_MIXED,
|
|
199
|
+
GIT_RESET_SOFT,
|
|
200
|
+
GIT_REVSPEC_MERGE_BASE,
|
|
201
|
+
GIT_REVSPEC_RANGE,
|
|
202
|
+
GIT_REVSPEC_SINGLE,
|
|
203
|
+
GIT_SORT_NONE,
|
|
204
|
+
GIT_SORT_REVERSE,
|
|
205
|
+
GIT_SORT_TIME,
|
|
206
|
+
GIT_SORT_TOPOLOGICAL,
|
|
207
|
+
GIT_STASH_APPLY_DEFAULT,
|
|
208
|
+
GIT_STASH_APPLY_REINSTATE_INDEX,
|
|
209
|
+
GIT_STASH_DEFAULT,
|
|
210
|
+
GIT_STASH_INCLUDE_IGNORED,
|
|
211
|
+
GIT_STASH_INCLUDE_UNTRACKED,
|
|
212
|
+
GIT_STASH_KEEP_ALL,
|
|
213
|
+
GIT_STASH_KEEP_INDEX,
|
|
214
|
+
GIT_STATUS_CONFLICTED,
|
|
215
|
+
GIT_STATUS_CURRENT,
|
|
216
|
+
GIT_STATUS_IGNORED,
|
|
217
|
+
GIT_STATUS_INDEX_DELETED,
|
|
218
|
+
GIT_STATUS_INDEX_MODIFIED,
|
|
219
|
+
GIT_STATUS_INDEX_NEW,
|
|
220
|
+
GIT_STATUS_INDEX_RENAMED,
|
|
221
|
+
GIT_STATUS_INDEX_TYPECHANGE,
|
|
222
|
+
GIT_STATUS_WT_DELETED,
|
|
223
|
+
GIT_STATUS_WT_MODIFIED,
|
|
224
|
+
GIT_STATUS_WT_NEW,
|
|
225
|
+
GIT_STATUS_WT_RENAMED,
|
|
226
|
+
GIT_STATUS_WT_TYPECHANGE,
|
|
227
|
+
GIT_STATUS_WT_UNREADABLE,
|
|
228
|
+
GIT_SUBMODULE_IGNORE_ALL,
|
|
229
|
+
GIT_SUBMODULE_IGNORE_DIRTY,
|
|
230
|
+
GIT_SUBMODULE_IGNORE_NONE,
|
|
231
|
+
GIT_SUBMODULE_IGNORE_UNSPECIFIED,
|
|
232
|
+
GIT_SUBMODULE_IGNORE_UNTRACKED,
|
|
233
|
+
GIT_SUBMODULE_STATUS_IN_CONFIG,
|
|
234
|
+
GIT_SUBMODULE_STATUS_IN_HEAD,
|
|
235
|
+
GIT_SUBMODULE_STATUS_IN_INDEX,
|
|
236
|
+
GIT_SUBMODULE_STATUS_IN_WD,
|
|
237
|
+
GIT_SUBMODULE_STATUS_INDEX_ADDED,
|
|
238
|
+
GIT_SUBMODULE_STATUS_INDEX_DELETED,
|
|
239
|
+
GIT_SUBMODULE_STATUS_INDEX_MODIFIED,
|
|
240
|
+
GIT_SUBMODULE_STATUS_WD_ADDED,
|
|
241
|
+
GIT_SUBMODULE_STATUS_WD_DELETED,
|
|
242
|
+
GIT_SUBMODULE_STATUS_WD_INDEX_MODIFIED,
|
|
243
|
+
GIT_SUBMODULE_STATUS_WD_MODIFIED,
|
|
244
|
+
GIT_SUBMODULE_STATUS_WD_UNINITIALIZED,
|
|
245
|
+
GIT_SUBMODULE_STATUS_WD_UNTRACKED,
|
|
246
|
+
GIT_SUBMODULE_STATUS_WD_WD_MODIFIED,
|
|
247
|
+
LIBGIT2_VER_MAJOR,
|
|
248
|
+
LIBGIT2_VER_MINOR,
|
|
249
|
+
LIBGIT2_VER_REVISION,
|
|
250
|
+
LIBGIT2_VERSION,
|
|
251
|
+
AlreadyExistsError,
|
|
252
|
+
Blob,
|
|
253
|
+
Branch,
|
|
254
|
+
Commit,
|
|
255
|
+
Diff,
|
|
256
|
+
DiffDelta,
|
|
257
|
+
DiffFile,
|
|
258
|
+
DiffHunk,
|
|
259
|
+
DiffLine,
|
|
260
|
+
DiffStats,
|
|
261
|
+
FilterSource,
|
|
262
|
+
GitError,
|
|
263
|
+
InvalidSpecError,
|
|
264
|
+
Mailmap,
|
|
265
|
+
Note,
|
|
266
|
+
Object,
|
|
267
|
+
Odb,
|
|
268
|
+
OdbBackend,
|
|
269
|
+
OdbBackendLoose,
|
|
270
|
+
OdbBackendPack,
|
|
271
|
+
Oid,
|
|
272
|
+
Patch,
|
|
273
|
+
Refdb,
|
|
274
|
+
RefdbBackend,
|
|
275
|
+
RefdbFsBackend,
|
|
276
|
+
Reference,
|
|
277
|
+
RefLogEntry,
|
|
278
|
+
RevSpec,
|
|
279
|
+
Signature,
|
|
280
|
+
Stash,
|
|
281
|
+
Tag,
|
|
282
|
+
Tree,
|
|
283
|
+
TreeBuilder,
|
|
284
|
+
Walker,
|
|
285
|
+
Worktree,
|
|
286
|
+
_cache_enums,
|
|
287
|
+
discover_repository,
|
|
288
|
+
filter_register,
|
|
289
|
+
filter_unregister,
|
|
290
|
+
hash,
|
|
291
|
+
hashfile,
|
|
292
|
+
init_file_backend,
|
|
293
|
+
reference_is_valid_name,
|
|
294
|
+
tree_entry_cmp,
|
|
295
|
+
)
|
|
40
296
|
from .blame import Blame, BlameHunk
|
|
41
297
|
from .blob import BlobIO
|
|
42
|
-
from .callbacks import Payload, RemoteCallbacks, CheckoutCallbacks, StashApplyCallbacks
|
|
43
298
|
from .callbacks import (
|
|
299
|
+
CheckoutCallbacks,
|
|
300
|
+
Payload,
|
|
301
|
+
RemoteCallbacks,
|
|
302
|
+
StashApplyCallbacks,
|
|
303
|
+
get_credentials,
|
|
44
304
|
git_clone_options,
|
|
45
305
|
git_fetch_options,
|
|
46
306
|
git_proxy_options,
|
|
47
|
-
get_credentials,
|
|
48
307
|
)
|
|
49
308
|
from .config import Config
|
|
50
309
|
from .credentials import *
|
|
51
|
-
from .errors import
|
|
52
|
-
from .ffi import
|
|
310
|
+
from .errors import Passthrough, check_error
|
|
311
|
+
from .ffi import C, ffi
|
|
53
312
|
from .filter import Filter
|
|
54
313
|
from .index import Index, IndexEntry
|
|
55
314
|
from .legacyenums import *
|
|
315
|
+
from .options import (
|
|
316
|
+
GIT_OPT_ADD_SSL_X509_CERT,
|
|
317
|
+
GIT_OPT_DISABLE_PACK_KEEP_FILE_CHECKS,
|
|
318
|
+
GIT_OPT_ENABLE_CACHING,
|
|
319
|
+
GIT_OPT_ENABLE_FSYNC_GITDIR,
|
|
320
|
+
GIT_OPT_ENABLE_HTTP_EXPECT_CONTINUE,
|
|
321
|
+
GIT_OPT_ENABLE_OFS_DELTA,
|
|
322
|
+
GIT_OPT_ENABLE_STRICT_HASH_VERIFICATION,
|
|
323
|
+
GIT_OPT_ENABLE_STRICT_OBJECT_CREATION,
|
|
324
|
+
GIT_OPT_ENABLE_STRICT_SYMBOLIC_REF_CREATION,
|
|
325
|
+
GIT_OPT_ENABLE_UNSAVED_INDEX_SAFETY,
|
|
326
|
+
GIT_OPT_GET_CACHED_MEMORY,
|
|
327
|
+
GIT_OPT_GET_EXTENSIONS,
|
|
328
|
+
GIT_OPT_GET_HOMEDIR,
|
|
329
|
+
GIT_OPT_GET_MWINDOW_FILE_LIMIT,
|
|
330
|
+
GIT_OPT_GET_MWINDOW_MAPPED_LIMIT,
|
|
331
|
+
GIT_OPT_GET_MWINDOW_SIZE,
|
|
332
|
+
GIT_OPT_GET_OWNER_VALIDATION,
|
|
333
|
+
GIT_OPT_GET_PACK_MAX_OBJECTS,
|
|
334
|
+
GIT_OPT_GET_SEARCH_PATH,
|
|
335
|
+
GIT_OPT_GET_SERVER_CONNECT_TIMEOUT,
|
|
336
|
+
GIT_OPT_GET_SERVER_TIMEOUT,
|
|
337
|
+
GIT_OPT_GET_TEMPLATE_PATH,
|
|
338
|
+
GIT_OPT_GET_USER_AGENT,
|
|
339
|
+
GIT_OPT_GET_USER_AGENT_PRODUCT,
|
|
340
|
+
GIT_OPT_GET_WINDOWS_SHAREMODE,
|
|
341
|
+
GIT_OPT_SET_ALLOCATOR,
|
|
342
|
+
GIT_OPT_SET_CACHE_MAX_SIZE,
|
|
343
|
+
GIT_OPT_SET_CACHE_OBJECT_LIMIT,
|
|
344
|
+
GIT_OPT_SET_EXTENSIONS,
|
|
345
|
+
GIT_OPT_SET_HOMEDIR,
|
|
346
|
+
GIT_OPT_SET_MWINDOW_FILE_LIMIT,
|
|
347
|
+
GIT_OPT_SET_MWINDOW_MAPPED_LIMIT,
|
|
348
|
+
GIT_OPT_SET_MWINDOW_SIZE,
|
|
349
|
+
GIT_OPT_SET_ODB_LOOSE_PRIORITY,
|
|
350
|
+
GIT_OPT_SET_ODB_PACKED_PRIORITY,
|
|
351
|
+
GIT_OPT_SET_OWNER_VALIDATION,
|
|
352
|
+
GIT_OPT_SET_PACK_MAX_OBJECTS,
|
|
353
|
+
GIT_OPT_SET_SEARCH_PATH,
|
|
354
|
+
GIT_OPT_SET_SERVER_CONNECT_TIMEOUT,
|
|
355
|
+
GIT_OPT_SET_SERVER_TIMEOUT,
|
|
356
|
+
GIT_OPT_SET_SSL_CERT_LOCATIONS,
|
|
357
|
+
GIT_OPT_SET_SSL_CIPHERS,
|
|
358
|
+
GIT_OPT_SET_TEMPLATE_PATH,
|
|
359
|
+
GIT_OPT_SET_USER_AGENT,
|
|
360
|
+
GIT_OPT_SET_USER_AGENT_PRODUCT,
|
|
361
|
+
GIT_OPT_SET_WINDOWS_SHAREMODE,
|
|
362
|
+
option,
|
|
363
|
+
)
|
|
56
364
|
from .packbuilder import PackBuilder
|
|
57
365
|
from .remotes import Remote
|
|
58
366
|
from .repository import Repository
|
|
@@ -60,7 +368,6 @@ from .settings import Settings
|
|
|
60
368
|
from .submodules import Submodule
|
|
61
369
|
from .utils import to_bytes, to_str
|
|
62
370
|
|
|
63
|
-
|
|
64
371
|
# Features
|
|
65
372
|
features = enums.Feature(C.git_libgit2_features())
|
|
66
373
|
|
|
@@ -73,12 +380,10 @@ _cache_enums()
|
|
|
73
380
|
|
|
74
381
|
|
|
75
382
|
def init_repository(
|
|
76
|
-
path:
|
|
383
|
+
path: str | bytes | os.PathLike[str] | os.PathLike[bytes] | None,
|
|
77
384
|
bare: bool = False,
|
|
78
385
|
flags: enums.RepositoryInitFlag = enums.RepositoryInitFlag.MKPATH,
|
|
79
|
-
mode:
|
|
80
|
-
int, enums.RepositoryInitMode
|
|
81
|
-
] = enums.RepositoryInitMode.SHARED_UMASK,
|
|
386
|
+
mode: int | enums.RepositoryInitMode = enums.RepositoryInitMode.SHARED_UMASK,
|
|
82
387
|
workdir_path: typing.Optional[str] = None,
|
|
83
388
|
description: typing.Optional[str] = None,
|
|
84
389
|
template_path: typing.Optional[str] = None,
|
|
@@ -155,8 +460,8 @@ def init_repository(
|
|
|
155
460
|
|
|
156
461
|
|
|
157
462
|
def clone_repository(
|
|
158
|
-
url: str | bytes | os.PathLike,
|
|
159
|
-
path: str | bytes | os.PathLike,
|
|
463
|
+
url: str | bytes | os.PathLike[str] | os.PathLike[bytes],
|
|
464
|
+
path: str | bytes | os.PathLike[str] | os.PathLike[bytes],
|
|
160
465
|
bare: bool = False,
|
|
161
466
|
repository: typing.Callable | None = None,
|
|
162
467
|
remote: typing.Callable | None = None,
|
|
@@ -164,7 +469,7 @@ def clone_repository(
|
|
|
164
469
|
callbacks: RemoteCallbacks | None = None,
|
|
165
470
|
depth: int = 0,
|
|
166
471
|
proxy: None | bool | str = None,
|
|
167
|
-
):
|
|
472
|
+
) -> Repository:
|
|
168
473
|
"""
|
|
169
474
|
Clones a new Git repository from *url* in the given *path*.
|
|
170
475
|
|
|
@@ -456,37 +761,51 @@ __all__ = (
|
|
|
456
761
|
'GIT_OBJECT_REF_DELTA',
|
|
457
762
|
'GIT_OBJECT_TAG',
|
|
458
763
|
'GIT_OBJECT_TREE',
|
|
764
|
+
'GIT_OPT_ADD_SSL_X509_CERT',
|
|
459
765
|
'GIT_OPT_DISABLE_PACK_KEEP_FILE_CHECKS',
|
|
460
766
|
'GIT_OPT_ENABLE_CACHING',
|
|
461
767
|
'GIT_OPT_ENABLE_FSYNC_GITDIR',
|
|
768
|
+
'GIT_OPT_ENABLE_HTTP_EXPECT_CONTINUE',
|
|
462
769
|
'GIT_OPT_ENABLE_OFS_DELTA',
|
|
463
770
|
'GIT_OPT_ENABLE_STRICT_HASH_VERIFICATION',
|
|
464
771
|
'GIT_OPT_ENABLE_STRICT_OBJECT_CREATION',
|
|
465
772
|
'GIT_OPT_ENABLE_STRICT_SYMBOLIC_REF_CREATION',
|
|
466
773
|
'GIT_OPT_ENABLE_UNSAVED_INDEX_SAFETY',
|
|
467
774
|
'GIT_OPT_GET_CACHED_MEMORY',
|
|
775
|
+
'GIT_OPT_GET_EXTENSIONS',
|
|
776
|
+
'GIT_OPT_GET_HOMEDIR',
|
|
468
777
|
'GIT_OPT_GET_MWINDOW_FILE_LIMIT',
|
|
469
778
|
'GIT_OPT_GET_MWINDOW_MAPPED_LIMIT',
|
|
470
779
|
'GIT_OPT_GET_MWINDOW_SIZE',
|
|
471
780
|
'GIT_OPT_GET_OWNER_VALIDATION',
|
|
472
781
|
'GIT_OPT_GET_PACK_MAX_OBJECTS',
|
|
473
782
|
'GIT_OPT_GET_SEARCH_PATH',
|
|
783
|
+
'GIT_OPT_GET_SERVER_CONNECT_TIMEOUT',
|
|
784
|
+
'GIT_OPT_GET_SERVER_TIMEOUT',
|
|
474
785
|
'GIT_OPT_GET_TEMPLATE_PATH',
|
|
475
786
|
'GIT_OPT_GET_USER_AGENT',
|
|
787
|
+
'GIT_OPT_GET_USER_AGENT_PRODUCT',
|
|
476
788
|
'GIT_OPT_GET_WINDOWS_SHAREMODE',
|
|
477
789
|
'GIT_OPT_SET_ALLOCATOR',
|
|
478
790
|
'GIT_OPT_SET_CACHE_MAX_SIZE',
|
|
479
791
|
'GIT_OPT_SET_CACHE_OBJECT_LIMIT',
|
|
792
|
+
'GIT_OPT_SET_EXTENSIONS',
|
|
793
|
+
'GIT_OPT_SET_HOMEDIR',
|
|
480
794
|
'GIT_OPT_SET_MWINDOW_FILE_LIMIT',
|
|
481
795
|
'GIT_OPT_SET_MWINDOW_MAPPED_LIMIT',
|
|
482
796
|
'GIT_OPT_SET_MWINDOW_SIZE',
|
|
797
|
+
'GIT_OPT_SET_ODB_LOOSE_PRIORITY',
|
|
798
|
+
'GIT_OPT_SET_ODB_PACKED_PRIORITY',
|
|
483
799
|
'GIT_OPT_SET_OWNER_VALIDATION',
|
|
484
800
|
'GIT_OPT_SET_PACK_MAX_OBJECTS',
|
|
485
801
|
'GIT_OPT_SET_SEARCH_PATH',
|
|
802
|
+
'GIT_OPT_SET_SERVER_CONNECT_TIMEOUT',
|
|
803
|
+
'GIT_OPT_SET_SERVER_TIMEOUT',
|
|
486
804
|
'GIT_OPT_SET_SSL_CERT_LOCATIONS',
|
|
487
805
|
'GIT_OPT_SET_SSL_CIPHERS',
|
|
488
806
|
'GIT_OPT_SET_TEMPLATE_PATH',
|
|
489
807
|
'GIT_OPT_SET_USER_AGENT',
|
|
808
|
+
'GIT_OPT_SET_USER_AGENT_PRODUCT',
|
|
490
809
|
'GIT_OPT_SET_WINDOWS_SHAREMODE',
|
|
491
810
|
'GIT_REFERENCES_ALL',
|
|
492
811
|
'GIT_REFERENCES_BRANCHES',
|
|
@@ -34,13 +34,13 @@ from pathlib import Path
|
|
|
34
34
|
#
|
|
35
35
|
# The version number of pygit2
|
|
36
36
|
#
|
|
37
|
-
__version__ = '1.18.
|
|
37
|
+
__version__ = '1.18.2'
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
#
|
|
41
41
|
# Utility functions to get the paths required for building extensions
|
|
42
42
|
#
|
|
43
|
-
def _get_libgit2_path():
|
|
43
|
+
def _get_libgit2_path() -> Path:
|
|
44
44
|
# LIBGIT2 environment variable takes precedence
|
|
45
45
|
libgit2_path = os.getenv('LIBGIT2')
|
|
46
46
|
if libgit2_path is not None:
|
|
@@ -52,7 +52,7 @@ def _get_libgit2_path():
|
|
|
52
52
|
return Path('/usr/local')
|
|
53
53
|
|
|
54
54
|
|
|
55
|
-
def get_libgit2_paths():
|
|
55
|
+
def get_libgit2_paths() -> tuple[Path, dict[str, list[str]]]:
|
|
56
56
|
# Base path
|
|
57
57
|
path = _get_libgit2_path()
|
|
58
58
|
|
|
@@ -61,7 +61,7 @@ def get_libgit2_paths():
|
|
|
61
61
|
if libgit2_lib is None:
|
|
62
62
|
library_dirs = [path / 'lib', path / 'lib64']
|
|
63
63
|
else:
|
|
64
|
-
library_dirs = [libgit2_lib]
|
|
64
|
+
library_dirs = [Path(libgit2_lib)]
|
|
65
65
|
|
|
66
66
|
include_dirs = [path / 'include']
|
|
67
67
|
return (
|