pygit2 1.16.0__tar.gz → 1.18.0__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.16.0 → pygit2-1.18.0}/AUTHORS.md +13 -2
- {pygit2-1.16.0 → pygit2-1.18.0}/CHANGELOG.md +84 -5
- pygit2-1.18.0/Makefile +7 -0
- {pygit2-1.16.0 → pygit2-1.18.0}/PKG-INFO +15 -2
- {pygit2-1.16.0 → pygit2-1.18.0}/build.sh +5 -4
- {pygit2-1.16.0 → pygit2-1.18.0}/build_tag.py +2 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/pygit2/__init__.py +35 -16
- {pygit2-1.16.0 → pygit2-1.18.0}/pygit2/_build.py +3 -3
- {pygit2-1.16.0 → pygit2-1.18.0}/pygit2/_pygit2.pyi +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/pygit2/_run.py +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/pygit2/blame.py +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/pygit2/branches.py +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/pygit2/callbacks.py +65 -9
- {pygit2-1.16.0 → pygit2-1.18.0}/pygit2/config.py +6 -9
- {pygit2-1.16.0 → pygit2-1.18.0}/pygit2/credentials.py +23 -9
- {pygit2-1.16.0 → pygit2-1.18.0}/pygit2/decl/blame.h +3 -0
- {pygit2-1.16.0 → pygit2-1.18.0}/pygit2/decl/callbacks.h +6 -0
- {pygit2-1.16.0 → pygit2-1.18.0}/pygit2/decl/commit.h +5 -0
- {pygit2-1.16.0 → pygit2-1.18.0}/pygit2/decl/config.h +0 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/pygit2/decl/remote.h +1 -0
- {pygit2-1.16.0 → pygit2-1.18.0}/pygit2/decl/repository.h +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/pygit2/enums.py +5 -5
- {pygit2-1.16.0 → pygit2-1.18.0}/pygit2/errors.py +2 -2
- {pygit2-1.16.0 → pygit2-1.18.0}/pygit2/ffi.py +2 -2
- {pygit2-1.16.0 → pygit2-1.18.0}/pygit2/filter.py +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/pygit2/index.py +3 -6
- {pygit2-1.16.0 → pygit2-1.18.0}/pygit2/legacyenums.py +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/pygit2/packbuilder.py +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/pygit2/references.py +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/pygit2/refspec.py +2 -2
- {pygit2-1.16.0 → pygit2-1.18.0}/pygit2/remotes.py +42 -36
- {pygit2-1.16.0 → pygit2-1.18.0}/pygit2/repository.py +51 -25
- {pygit2-1.16.0 → pygit2-1.18.0}/pygit2/settings.py +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/pygit2/submodules.py +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/pygit2/utils.py +10 -10
- {pygit2-1.16.0 → pygit2-1.18.0}/pyproject.toml +13 -12
- {pygit2-1.16.0 → pygit2-1.18.0}/setup.py +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/src/blob.c +21 -13
- {pygit2-1.16.0 → pygit2-1.18.0}/src/branch.c +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/src/branch.h +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/src/commit.c +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/src/diff.c +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/src/diff.h +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/src/error.c +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/src/error.h +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/src/filter.c +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/src/filter.h +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/src/mailmap.c +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/src/mailmap.h +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/src/note.c +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/src/note.h +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/src/object.c +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/src/object.h +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/src/odb.c +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/src/odb.h +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/src/odb_backend.c +2 -2
- {pygit2-1.16.0 → pygit2-1.18.0}/src/odb_backend.h +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/src/oid.c +50 -2
- {pygit2-1.16.0 → pygit2-1.18.0}/src/oid.h +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/src/options.c +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/src/options.h +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/src/patch.c +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/src/patch.h +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/src/pygit2.c +2 -2
- {pygit2-1.16.0 → pygit2-1.18.0}/src/refdb.c +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/src/refdb.h +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/src/refdb_backend.c +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/src/refdb_backend.h +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/src/reference.c +11 -2
- {pygit2-1.16.0 → pygit2-1.18.0}/src/reference.h +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/src/repository.c +8 -6
- {pygit2-1.16.0 → pygit2-1.18.0}/src/repository.h +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/src/revspec.c +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/src/revspec.h +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/src/signature.c +2 -2
- {pygit2-1.16.0 → pygit2-1.18.0}/src/signature.h +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/src/stash.c +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/src/tag.c +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/src/tree.c +8 -7
- {pygit2-1.16.0 → pygit2-1.18.0}/src/tree.h +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/src/treebuilder.c +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/src/treebuilder.h +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/src/types.h +3 -3
- {pygit2-1.16.0 → pygit2-1.18.0}/src/utils.c +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/src/utils.h +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/src/walker.c +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/src/walker.h +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/src/worktree.c +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/src/worktree.h +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/test/__init__.py +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/test/test_apply_diff.py +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/test/test_archive.py +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/test/test_attributes.py +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/test/test_blame.py +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/test/test_blob.py +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/test/test_branch.py +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/test/test_branch_empty.py +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/test/test_cherrypick.py +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/test/test_commit.py +3 -3
- {pygit2-1.16.0 → pygit2-1.18.0}/test/test_commit_gpg.py +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/test/test_commit_trailer.py +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/test/test_config.py +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/test/test_credentials.py +1 -3
- {pygit2-1.16.0 → pygit2-1.18.0}/test/test_describe.py +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/test/test_diff.py +78 -2
- {pygit2-1.16.0 → pygit2-1.18.0}/test/test_diff_binary.py +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/test/test_index.py +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/test/test_mailmap.py +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/test/test_merge.py +60 -33
- pygit2-1.18.0/test/test_nonunicode.py +48 -0
- {pygit2-1.16.0 → pygit2-1.18.0}/test/test_note.py +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/test/test_object.py +3 -3
- {pygit2-1.16.0 → pygit2-1.18.0}/test/test_odb.py +2 -2
- {pygit2-1.16.0 → pygit2-1.18.0}/test/test_odb_backend.py +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/test/test_oid.py +8 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/test/test_options.py +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/test/test_packbuilder.py +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/test/test_patch.py +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/test/test_patch_encoding.py +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/test/test_refdb_backend.py +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/test/test_refs.py +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/test/test_remote.py +132 -29
- {pygit2-1.16.0 → pygit2-1.18.0}/test/test_remote_prune.py +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/test/test_remote_utf8.py +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/test/test_repository.py +23 -4
- {pygit2-1.16.0 → pygit2-1.18.0}/test/test_repository_bare.py +10 -10
- {pygit2-1.16.0 → pygit2-1.18.0}/test/test_repository_custom.py +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/test/test_repository_empty.py +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/test/test_revparse.py +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/test/test_revwalk.py +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/test/test_signature.py +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/test/test_status.py +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/test/test_submodule.py +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/test/test_tag.py +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/test/test_tree.py +2 -2
- {pygit2-1.16.0 → pygit2-1.18.0}/test/test_treebuilder.py +1 -1
- {pygit2-1.16.0 → pygit2-1.18.0}/test/utils.py +6 -7
- pygit2-1.16.0/Makefile +0 -7
- {pygit2-1.16.0 → pygit2-1.18.0}/COPYING +0 -0
- {pygit2-1.16.0 → pygit2-1.18.0}/README.md +0 -0
- {pygit2-1.16.0 → pygit2-1.18.0}/SPONSORS.md +0 -0
- {pygit2-1.16.0 → pygit2-1.18.0}/mypy-stubtest.ini +0 -0
- {pygit2-1.16.0 → pygit2-1.18.0}/pygit2/blob.py +0 -0
- {pygit2-1.16.0 → pygit2-1.18.0}/pygit2/decl/attr.h +0 -0
- {pygit2-1.16.0 → pygit2-1.18.0}/pygit2/decl/buffer.h +0 -0
- {pygit2-1.16.0 → pygit2-1.18.0}/pygit2/decl/checkout.h +0 -0
- {pygit2-1.16.0 → pygit2-1.18.0}/pygit2/decl/clone.h +0 -0
- {pygit2-1.16.0 → pygit2-1.18.0}/pygit2/decl/common.h +0 -0
- {pygit2-1.16.0 → pygit2-1.18.0}/pygit2/decl/describe.h +0 -0
- {pygit2-1.16.0 → pygit2-1.18.0}/pygit2/decl/diff.h +0 -0
- {pygit2-1.16.0 → pygit2-1.18.0}/pygit2/decl/errors.h +0 -0
- {pygit2-1.16.0 → pygit2-1.18.0}/pygit2/decl/graph.h +0 -0
- {pygit2-1.16.0 → pygit2-1.18.0}/pygit2/decl/index.h +0 -0
- {pygit2-1.16.0 → pygit2-1.18.0}/pygit2/decl/indexer.h +0 -0
- {pygit2-1.16.0 → pygit2-1.18.0}/pygit2/decl/merge.h +0 -0
- {pygit2-1.16.0 → pygit2-1.18.0}/pygit2/decl/net.h +0 -0
- {pygit2-1.16.0 → pygit2-1.18.0}/pygit2/decl/oid.h +0 -0
- {pygit2-1.16.0 → pygit2-1.18.0}/pygit2/decl/pack.h +0 -0
- {pygit2-1.16.0 → pygit2-1.18.0}/pygit2/decl/proxy.h +0 -0
- {pygit2-1.16.0 → pygit2-1.18.0}/pygit2/decl/refspec.h +0 -0
- {pygit2-1.16.0 → pygit2-1.18.0}/pygit2/decl/revert.h +0 -0
- {pygit2-1.16.0 → pygit2-1.18.0}/pygit2/decl/stash.h +0 -0
- {pygit2-1.16.0 → pygit2-1.18.0}/pygit2/decl/strarray.h +0 -0
- {pygit2-1.16.0 → pygit2-1.18.0}/pygit2/decl/submodule.h +0 -0
- {pygit2-1.16.0 → pygit2-1.18.0}/pygit2/decl/transport.h +0 -0
- {pygit2-1.16.0 → pygit2-1.18.0}/pygit2/decl/types.h +0 -0
- {pygit2-1.16.0 → pygit2-1.18.0}/pygit2/py.typed +0 -0
- {pygit2-1.16.0 → pygit2-1.18.0}/pytest.ini +0 -0
- {pygit2-1.16.0 → pygit2-1.18.0}/requirements-test.txt +0 -0
- {pygit2-1.16.0 → pygit2-1.18.0}/requirements.txt +0 -0
- {pygit2-1.16.0 → pygit2-1.18.0}/setup.cfg +0 -0
- {pygit2-1.16.0 → pygit2-1.18.0}/src/wildmatch.c +0 -0
- {pygit2-1.16.0 → pygit2-1.18.0}/src/wildmatch.h +0 -0
- {pygit2-1.16.0 → pygit2-1.18.0}/test/conftest.py +0 -0
- {pygit2-1.16.0 → pygit2-1.18.0}/test/data/barerepo.zip +0 -0
- {pygit2-1.16.0 → pygit2-1.18.0}/test/data/binaryfilerepo.zip +0 -0
- {pygit2-1.16.0 → pygit2-1.18.0}/test/data/blameflagsrepo.zip +0 -0
- {pygit2-1.16.0 → pygit2-1.18.0}/test/data/dirtyrepo.zip +0 -0
- {pygit2-1.16.0 → pygit2-1.18.0}/test/data/emptyrepo.zip +0 -0
- {pygit2-1.16.0 → pygit2-1.18.0}/test/data/encoding.zip +0 -0
- {pygit2-1.16.0 → pygit2-1.18.0}/test/data/gpgsigned.zip +0 -0
- {pygit2-1.16.0 → pygit2-1.18.0}/test/data/submodulerepo.zip +0 -0
- {pygit2-1.16.0 → pygit2-1.18.0}/test/data/testrepo.zip +0 -0
- {pygit2-1.16.0 → pygit2-1.18.0}/test/data/testrepoformerging.zip +0 -0
- {pygit2-1.16.0 → pygit2-1.18.0}/test/data/testrepopacked.zip +0 -0
- {pygit2-1.16.0 → pygit2-1.18.0}/test/data/trailerrepo.zip +0 -0
- {pygit2-1.16.0 → pygit2-1.18.0}/test/data/utf8branchrepo.zip +0 -0
- {pygit2-1.16.0 → pygit2-1.18.0}/test/keys/pygit2_empty +0 -0
- {pygit2-1.16.0 → pygit2-1.18.0}/test/keys/pygit2_empty.pub +0 -0
- {pygit2-1.16.0 → pygit2-1.18.0}/test/test_filter.py +0 -0
|
@@ -43,14 +43,16 @@ Authors:
|
|
|
43
43
|
Chad Dombrova
|
|
44
44
|
Lukas Fleischer
|
|
45
45
|
Mathias Leppich
|
|
46
|
+
Mathieu Parent
|
|
47
|
+
Michał Kępień
|
|
46
48
|
Nicolas Dandrimont
|
|
47
49
|
Raphael Medaer (Escaux)
|
|
50
|
+
Yaroslav Halchenko
|
|
48
51
|
Anatoly Techtonik
|
|
49
52
|
Andrew Olsen
|
|
50
53
|
Dan Sully
|
|
51
54
|
David Versmisse
|
|
52
55
|
Grégory Herrero
|
|
53
|
-
Michał Kępień
|
|
54
56
|
Mikhail Yushkovskiy
|
|
55
57
|
Robin Stocker
|
|
56
58
|
Rohit Sanjay
|
|
@@ -89,6 +91,7 @@ Authors:
|
|
|
89
91
|
Andrey Devyatkin
|
|
90
92
|
Arno van Lumig
|
|
91
93
|
Ben Davis
|
|
94
|
+
CJ Steiner
|
|
92
95
|
Colin Watson
|
|
93
96
|
Dan Yeaw
|
|
94
97
|
Dustin Raimondi
|
|
@@ -111,9 +114,9 @@ Authors:
|
|
|
111
114
|
Kaarel Kitsemets
|
|
112
115
|
Ken Dreyer
|
|
113
116
|
Kevin KIN-FOO
|
|
117
|
+
Kyle Gottfried
|
|
114
118
|
Marcel Waldvogel
|
|
115
119
|
Masud Rahman
|
|
116
|
-
Mathieu Parent
|
|
117
120
|
Michael Sondergaard
|
|
118
121
|
Natanael Arndt
|
|
119
122
|
Ondřej Nový
|
|
@@ -126,6 +129,7 @@ Authors:
|
|
|
126
129
|
nikitalita
|
|
127
130
|
Adam Gausmann
|
|
128
131
|
Adam Spiers
|
|
132
|
+
Adrien Nader
|
|
129
133
|
Albin Söderström
|
|
130
134
|
Alexandru Fikl
|
|
131
135
|
Andrew Chin
|
|
@@ -159,6 +163,7 @@ Authors:
|
|
|
159
163
|
David Six
|
|
160
164
|
Dennis Schwertel
|
|
161
165
|
Devaev Maxim
|
|
166
|
+
Edmundo Carmona Antoranz
|
|
162
167
|
Eric Davis
|
|
163
168
|
Erik Meusel
|
|
164
169
|
Erik van Zijst
|
|
@@ -174,10 +179,13 @@ Authors:
|
|
|
174
179
|
Jasper Lievisse Adriaanse
|
|
175
180
|
Jimisola Laursen
|
|
176
181
|
Jiri Benc
|
|
182
|
+
Johann Miller
|
|
177
183
|
Jonathan Robson
|
|
178
184
|
Josh Bleecher Snyder
|
|
179
185
|
Julia Evans
|
|
180
186
|
Justin Clift
|
|
187
|
+
Karl Malmros
|
|
188
|
+
Kevin Valk
|
|
181
189
|
Konstantinos Smanis
|
|
182
190
|
Kyriakos Oikonomakos
|
|
183
191
|
Lance Eftink
|
|
@@ -187,6 +195,7 @@ Authors:
|
|
|
187
195
|
Mathieu Bridon
|
|
188
196
|
Mathieu Pillard
|
|
189
197
|
Matthaus Woolard
|
|
198
|
+
Matěj Cepl
|
|
190
199
|
Maxwell G
|
|
191
200
|
Michał Górny
|
|
192
201
|
Na'aman Hirschfeld
|
|
@@ -208,6 +217,7 @@ Authors:
|
|
|
208
217
|
Rodrigo Bistolfi
|
|
209
218
|
Ross Nicoll
|
|
210
219
|
Rui Abreu Ferreira
|
|
220
|
+
Rui Chen
|
|
211
221
|
Sandro Jäckel
|
|
212
222
|
Saul Pwanson
|
|
213
223
|
Shane Turner
|
|
@@ -219,6 +229,7 @@ Authors:
|
|
|
219
229
|
Timo Röhling
|
|
220
230
|
Victor Florea
|
|
221
231
|
Vladimir Rutsky
|
|
232
|
+
William Schueller
|
|
222
233
|
Wim Jeantine-Glenn
|
|
223
234
|
Yu Jianjian
|
|
224
235
|
buhl
|
|
@@ -1,3 +1,82 @@
|
|
|
1
|
+
# 1.18.0 (2025-04-24)
|
|
2
|
+
|
|
3
|
+
- Upgrade Linux Glibc wheels to `manylinux_2_28`
|
|
4
|
+
|
|
5
|
+
- Add `RemoteCallbacks.push_transfer_progress(...)` callback
|
|
6
|
+
[#1345](https://github.com/libgit2/pygit2/pull/1345)
|
|
7
|
+
|
|
8
|
+
- New `bool(oid)`
|
|
9
|
+
[#1347](https://github.com/libgit2/pygit2/pull/1347)
|
|
10
|
+
|
|
11
|
+
- Now `Repository.merge(...)` accepts a commit or reference object
|
|
12
|
+
[#1348](https://github.com/libgit2/pygit2/pull/1348)
|
|
13
|
+
|
|
14
|
+
- New `threads` optional argument in `Remote.push(...)`
|
|
15
|
+
[#1352](https://github.com/libgit2/pygit2/pull/1352)
|
|
16
|
+
|
|
17
|
+
- New `proxy` optional argument in `clone_repository(...)`
|
|
18
|
+
[#1354](https://github.com/libgit2/pygit2/pull/1354)
|
|
19
|
+
|
|
20
|
+
- New optional arguments `context_lines` and `interhunk_lines` in `Blob.diff(...)` ; and
|
|
21
|
+
now `Repository.diff(...)` honors these two arguments when the objects diffed are blobs.
|
|
22
|
+
[#1360](https://github.com/libgit2/pygit2/pull/1360)
|
|
23
|
+
|
|
24
|
+
- Now `Tree.diff_to_workdir(...)` accepts keyword arguments, not just positional.
|
|
25
|
+
|
|
26
|
+
- Fix when a reference name has non UTF-8 chars
|
|
27
|
+
[#1329](https://github.com/libgit2/pygit2/pull/1329)
|
|
28
|
+
|
|
29
|
+
- Fix condition check in `Repository.remotes.rename(...)`
|
|
30
|
+
[#1342](https://github.com/libgit2/pygit2/pull/1342)
|
|
31
|
+
|
|
32
|
+
- Add codespell workflow, fix a number of typos
|
|
33
|
+
[#1344](https://github.com/libgit2/pygit2/pull/1344)
|
|
34
|
+
|
|
35
|
+
- Documentation and typing
|
|
36
|
+
[#1343](https://github.com/libgit2/pygit2/pull/1343)
|
|
37
|
+
[#1347](https://github.com/libgit2/pygit2/pull/1347)
|
|
38
|
+
[#1356](https://github.com/libgit2/pygit2/pull/1356)
|
|
39
|
+
|
|
40
|
+
- CI: Use ARM runner for tests and wheels
|
|
41
|
+
[#1346](https://github.com/libgit2/pygit2/pull/1346)
|
|
42
|
+
|
|
43
|
+
- Build and CI updates
|
|
44
|
+
[#1363](https://github.com/libgit2/pygit2/pull/1363)
|
|
45
|
+
[#1365](https://github.com/libgit2/pygit2/pull/1365)
|
|
46
|
+
|
|
47
|
+
Deprecations:
|
|
48
|
+
|
|
49
|
+
- Passing str to `Repository.merge(...)` is deprecated,
|
|
50
|
+
instead pass an oid object (or a commit, or a reference)
|
|
51
|
+
[#1349](https://github.com/libgit2/pygit2/pull/1349)
|
|
52
|
+
|
|
53
|
+
Breaking changes:
|
|
54
|
+
|
|
55
|
+
- Keyword argument `flag` has been renamed to `flags` in `Blob.diff(...)` and
|
|
56
|
+
`Blob.diff_to_buffer(...)`
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
# 1.17.0 (2025-01-08)
|
|
60
|
+
|
|
61
|
+
- Upgrade to libgit2 1.9
|
|
62
|
+
|
|
63
|
+
- Add `certificate_check` callback to `Remote.ls_remotes(...)`
|
|
64
|
+
[#1326](https://github.com/libgit2/pygit2/pull/1326)
|
|
65
|
+
|
|
66
|
+
- Fix build with GCC 14
|
|
67
|
+
[#1324](https://github.com/libgit2/pygit2/pull/1324)
|
|
68
|
+
|
|
69
|
+
- Release wheels for PyPy
|
|
70
|
+
[#1336](https://github.com/libgit2/pygit2/pull/1336)
|
|
71
|
+
[#1339](https://github.com/libgit2/pygit2/pull/1339)
|
|
72
|
+
|
|
73
|
+
- CI: update tests for macOS to use OpenSSL 3
|
|
74
|
+
[#1335](https://github.com/libgit2/pygit2/pull/1335)
|
|
75
|
+
|
|
76
|
+
- Documentation: fix typo in `Repository.status(...)` docstring
|
|
77
|
+
[#1327](https://github.com/libgit2/pygit2/pull/1327)
|
|
78
|
+
|
|
79
|
+
|
|
1
80
|
# 1.16.0 (2024-10-11)
|
|
2
81
|
|
|
3
82
|
- Add support for Python 3.13
|
|
@@ -238,7 +317,7 @@ Deprecations:
|
|
|
238
317
|
- New `keep_all` and `paths` optional arguments for
|
|
239
318
|
`Repository.stash(...)`
|
|
240
319
|
[#1202](https://github.com/libgit2/pygit2/pull/1202)
|
|
241
|
-
- New `
|
|
320
|
+
- New `Repository.state()`
|
|
242
321
|
[#1204](https://github.com/libgit2/pygit2/pull/1204)
|
|
243
322
|
- Improve `Repository.write_archive(...)` performance
|
|
244
323
|
[#1183](https://github.com/libgit2/pygit2/pull/1183)
|
|
@@ -418,7 +497,7 @@ Breaking changes:
|
|
|
418
497
|
|
|
419
498
|
Breaking changes:
|
|
420
499
|
|
|
421
|
-
- Remove deprecated `GIT_CREDTYPE_XXX`
|
|
500
|
+
- Remove deprecated `GIT_CREDTYPE_XXX` constants, use
|
|
422
501
|
`GIT_CREDENTIAL_XXX` instead.
|
|
423
502
|
- Remove deprecated `Patch.patch` getter, use `Patch.text` instead.
|
|
424
503
|
|
|
@@ -515,7 +594,7 @@ Deprecations:
|
|
|
515
594
|
|
|
516
595
|
- Deprecate `Repository.create_remote(...)`, use instead
|
|
517
596
|
`Repository.remotes.create(...)`
|
|
518
|
-
- Deprecate `GIT_CREDTYPE_XXX`
|
|
597
|
+
- Deprecate `GIT_CREDTYPE_XXX` constants, use `GIT_CREDENTIAL_XXX`
|
|
519
598
|
instead.
|
|
520
599
|
|
|
521
600
|
# 1.2.0 (2020-04-05)
|
|
@@ -636,7 +715,7 @@ Breaking changes:
|
|
|
636
715
|
|
|
637
716
|
Breaking changes:
|
|
638
717
|
|
|
639
|
-
- Now the Repository has a new
|
|
718
|
+
- Now the Repository has a new attribute `odb` for object database:
|
|
640
719
|
|
|
641
720
|
# Before
|
|
642
721
|
repository.read(...)
|
|
@@ -841,7 +920,7 @@ Other changes:
|
|
|
841
920
|
[#610](https://github.com/libgit2/pygit2/issues/610)
|
|
842
921
|
- Fix tests failing in some cases
|
|
843
922
|
[#795](https://github.com/libgit2/pygit2/issues/795)
|
|
844
|
-
-
|
|
923
|
+
- Automate wheels upload to pypi
|
|
845
924
|
[#563](https://github.com/libgit2/pygit2/issues/563)
|
|
846
925
|
|
|
847
926
|
# 0.27.0 (2018-03-30)
|
pygit2-1.18.0/Makefile
ADDED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: pygit2
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.18.0
|
|
4
4
|
Summary: Python bindings for libgit2.
|
|
5
5
|
Home-page: https://github.com/libgit2/pygit2
|
|
6
6
|
Maintainer: J. David Ibáñez
|
|
@@ -27,6 +27,19 @@ Description-Content-Type: text/markdown
|
|
|
27
27
|
License-File: COPYING
|
|
28
28
|
License-File: AUTHORS.md
|
|
29
29
|
Requires-Dist: cffi>=1.17.0
|
|
30
|
+
Dynamic: classifier
|
|
31
|
+
Dynamic: description
|
|
32
|
+
Dynamic: description-content-type
|
|
33
|
+
Dynamic: home-page
|
|
34
|
+
Dynamic: keywords
|
|
35
|
+
Dynamic: license
|
|
36
|
+
Dynamic: license-file
|
|
37
|
+
Dynamic: maintainer
|
|
38
|
+
Dynamic: maintainer-email
|
|
39
|
+
Dynamic: project-url
|
|
40
|
+
Dynamic: requires-dist
|
|
41
|
+
Dynamic: requires-python
|
|
42
|
+
Dynamic: summary
|
|
30
43
|
|
|
31
44
|
# pygit2 - libgit2 bindings in Python
|
|
32
45
|
|
|
@@ -22,14 +22,14 @@
|
|
|
22
22
|
#
|
|
23
23
|
# sh build.sh
|
|
24
24
|
#
|
|
25
|
-
# Build libgit2 1.
|
|
25
|
+
# Build libgit2 1.9.0 (will use libssh2 if available), then build pygit2
|
|
26
26
|
# inplace:
|
|
27
27
|
#
|
|
28
|
-
# LIBGIT2_VERSION=1.
|
|
28
|
+
# LIBGIT2_VERSION=1.9.0 sh build.sh
|
|
29
29
|
#
|
|
30
|
-
# Build libssh2 1.11.
|
|
30
|
+
# Build libssh2 1.11.1 and libgit2 1.9.0, then build pygit2 inplace:
|
|
31
31
|
#
|
|
32
|
-
# LIBSSH2_VERSION=1.11.
|
|
32
|
+
# LIBSSH2_VERSION=1.11.1 LIBGIT2_VERSION=1.9.0 sh build.sh
|
|
33
33
|
#
|
|
34
34
|
# Build inplace and run the tests:
|
|
35
35
|
#
|
|
@@ -69,6 +69,7 @@ if [ "$CIBUILDWHEEL" = "1" ]; then
|
|
|
69
69
|
yum install openssl-devel -y
|
|
70
70
|
else
|
|
71
71
|
yum install perl-IPC-Cmd -y
|
|
72
|
+
yum install perl-Pod-Html -y
|
|
72
73
|
fi
|
|
73
74
|
elif [ -f /sbin/apk ]; then
|
|
74
75
|
apk add wget
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2010-
|
|
1
|
+
# Copyright 2010-2025 The pygit2 contributors
|
|
2
2
|
#
|
|
3
3
|
# This file is free software; you can redistribute it and/or modify
|
|
4
4
|
# it under the terms of the GNU General Public License, version 2,
|
|
@@ -23,9 +23,11 @@
|
|
|
23
23
|
# the Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
|
24
24
|
# Boston, MA 02110-1301, USA.
|
|
25
25
|
|
|
26
|
+
# ruff: noqa: F401 F403 F405
|
|
27
|
+
|
|
26
28
|
# Standard Library
|
|
27
29
|
import functools
|
|
28
|
-
|
|
30
|
+
import os
|
|
29
31
|
import typing
|
|
30
32
|
|
|
31
33
|
# Low level API
|
|
@@ -38,7 +40,12 @@ from ._build import __version__
|
|
|
38
40
|
from .blame import Blame, BlameHunk
|
|
39
41
|
from .blob import BlobIO
|
|
40
42
|
from .callbacks import Payload, RemoteCallbacks, CheckoutCallbacks, StashApplyCallbacks
|
|
41
|
-
from .callbacks import
|
|
43
|
+
from .callbacks import (
|
|
44
|
+
git_clone_options,
|
|
45
|
+
git_fetch_options,
|
|
46
|
+
git_proxy_options,
|
|
47
|
+
get_credentials,
|
|
48
|
+
)
|
|
42
49
|
from .config import Config
|
|
43
50
|
from .credentials import *
|
|
44
51
|
from .errors import check_error, Passthrough
|
|
@@ -66,7 +73,7 @@ _cache_enums()
|
|
|
66
73
|
|
|
67
74
|
|
|
68
75
|
def init_repository(
|
|
69
|
-
path: typing.Union[str, bytes, PathLike, None],
|
|
76
|
+
path: typing.Union[str, bytes, os.PathLike, None],
|
|
70
77
|
bare: bool = False,
|
|
71
78
|
flags: enums.RepositoryInitFlag = enums.RepositoryInitFlag.MKPATH,
|
|
72
79
|
mode: typing.Union[
|
|
@@ -86,7 +93,7 @@ def init_repository(
|
|
|
86
93
|
|
|
87
94
|
The *flags* may be a combination of enums.RepositoryInitFlag constants:
|
|
88
95
|
|
|
89
|
-
- BARE (
|
|
96
|
+
- BARE (overridden by the *bare* parameter)
|
|
90
97
|
- NO_REINIT
|
|
91
98
|
- NO_DOTGIT_DIR
|
|
92
99
|
- MKDIR
|
|
@@ -99,6 +106,10 @@ def init_repository(
|
|
|
99
106
|
The *workdir_path*, *description*, *template_path*, *initial_head* and
|
|
100
107
|
*origin_url* are all strings.
|
|
101
108
|
|
|
109
|
+
If a repository already exists at *path*, it may be opened successfully but
|
|
110
|
+
you must not rely on that behavior and should use the Repository
|
|
111
|
+
constructor directly instead.
|
|
112
|
+
|
|
102
113
|
See libgit2's documentation on git_repository_init_ext for further details.
|
|
103
114
|
"""
|
|
104
115
|
# Pre-process input parameters
|
|
@@ -144,14 +155,15 @@ def init_repository(
|
|
|
144
155
|
|
|
145
156
|
|
|
146
157
|
def clone_repository(
|
|
147
|
-
url,
|
|
148
|
-
path,
|
|
149
|
-
bare=False,
|
|
150
|
-
repository=None,
|
|
151
|
-
remote=None,
|
|
152
|
-
checkout_branch=None,
|
|
153
|
-
callbacks=None,
|
|
154
|
-
depth=0,
|
|
158
|
+
url: str,
|
|
159
|
+
path: str,
|
|
160
|
+
bare: bool = False,
|
|
161
|
+
repository: typing.Callable | None = None,
|
|
162
|
+
remote: typing.Callable | None = None,
|
|
163
|
+
checkout_branch: str | None = None,
|
|
164
|
+
callbacks: RemoteCallbacks | None = None,
|
|
165
|
+
depth: int = 0,
|
|
166
|
+
proxy: None | bool | str = None,
|
|
155
167
|
):
|
|
156
168
|
"""
|
|
157
169
|
Clones a new Git repository from *url* in the given *path*.
|
|
@@ -192,6 +204,12 @@ def clone_repository(
|
|
|
192
204
|
If greater than 0, creates a shallow clone with a history truncated to
|
|
193
205
|
the specified number of commits.
|
|
194
206
|
The default is 0 (full commit history).
|
|
207
|
+
proxy : None or True or str
|
|
208
|
+
Proxy configuration. Can be one of:
|
|
209
|
+
|
|
210
|
+
* `None` (the default) to disable proxy usage
|
|
211
|
+
* `True` to enable automatic proxy detection
|
|
212
|
+
* an url to a proxy (`http://proxy.example.org:3128/`)
|
|
195
213
|
"""
|
|
196
214
|
|
|
197
215
|
if callbacks is None:
|
|
@@ -212,9 +230,10 @@ def clone_repository(
|
|
|
212
230
|
opts.checkout_branch = checkout_branch_ref
|
|
213
231
|
|
|
214
232
|
with git_fetch_options(payload, opts=opts.fetch_opts):
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
233
|
+
with git_proxy_options(payload, opts.fetch_opts.proxy_opts, proxy):
|
|
234
|
+
crepo = ffi.new('git_repository **')
|
|
235
|
+
err = C.git_clone(crepo, to_bytes(url), to_bytes(path), opts)
|
|
236
|
+
payload.check_error(err)
|
|
218
237
|
|
|
219
238
|
# Ok
|
|
220
239
|
return Repository._from_c(crepo[0], owned=True)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2010-
|
|
1
|
+
# Copyright 2010-2025 The pygit2 contributors
|
|
2
2
|
#
|
|
3
3
|
# This file is free software; you can redistribute it and/or modify
|
|
4
4
|
# it under the terms of the GNU General Public License, version 2,
|
|
@@ -34,11 +34,11 @@ from pathlib import Path
|
|
|
34
34
|
#
|
|
35
35
|
# The version number of pygit2
|
|
36
36
|
#
|
|
37
|
-
__version__ = '1.
|
|
37
|
+
__version__ = '1.18.0'
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
#
|
|
41
|
-
# Utility functions to get the paths required for
|
|
41
|
+
# Utility functions to get the paths required for building extensions
|
|
42
42
|
#
|
|
43
43
|
def _get_libgit2_path():
|
|
44
44
|
# LIBGIT2 environment variable takes precedence
|
|
@@ -262,7 +262,6 @@ class OdbBackendPack(OdbBackend):
|
|
|
262
262
|
def __init__(self, *args, **kwargs) -> None: ...
|
|
263
263
|
|
|
264
264
|
class Oid:
|
|
265
|
-
hex: str
|
|
266
265
|
raw: bytes
|
|
267
266
|
def __init__(self, raw: bytes = ..., hex: str = ...) -> None: ...
|
|
268
267
|
def __eq__(self, other) -> bool: ...
|
|
@@ -272,6 +271,7 @@ class Oid:
|
|
|
272
271
|
def __le__(self, other) -> bool: ...
|
|
273
272
|
def __lt__(self, other) -> bool: ...
|
|
274
273
|
def __ne__(self, other) -> bool: ...
|
|
274
|
+
def __bool__(self) -> bool: ...
|
|
275
275
|
|
|
276
276
|
class Patch:
|
|
277
277
|
data: bytes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2010-
|
|
1
|
+
# Copyright 2010-2025 The pygit2 contributors
|
|
2
2
|
#
|
|
3
3
|
# This file is free software; you can redistribute it and/or modify
|
|
4
4
|
# it under the terms of the GNU General Public License, version 2,
|
|
@@ -82,12 +82,12 @@ from .utils import maybe_string, to_bytes, ptr_to_bytes, StrArray
|
|
|
82
82
|
|
|
83
83
|
|
|
84
84
|
class Payload:
|
|
85
|
-
def __init__(self, **kw):
|
|
85
|
+
def __init__(self, **kw: object):
|
|
86
86
|
for key, value in kw.items():
|
|
87
87
|
setattr(self, key, value)
|
|
88
88
|
self._stored_exception = None
|
|
89
89
|
|
|
90
|
-
def check_error(self, error_code):
|
|
90
|
+
def check_error(self, error_code: int) -> None:
|
|
91
91
|
if error_code == C.GIT_EUSER:
|
|
92
92
|
assert self._stored_exception is not None
|
|
93
93
|
raise self._stored_exception
|
|
@@ -120,7 +120,7 @@ class RemoteCallbacks(Payload):
|
|
|
120
120
|
if certificate_check is not None:
|
|
121
121
|
self.certificate_check = certificate_check
|
|
122
122
|
|
|
123
|
-
def sideband_progress(self, string):
|
|
123
|
+
def sideband_progress(self, string: str) -> None:
|
|
124
124
|
"""
|
|
125
125
|
Progress output callback. Override this function with your own
|
|
126
126
|
progress reporting function
|
|
@@ -159,7 +159,7 @@ class RemoteCallbacks(Payload):
|
|
|
159
159
|
"""
|
|
160
160
|
raise Passthrough
|
|
161
161
|
|
|
162
|
-
def certificate_check(self, certificate, valid, host):
|
|
162
|
+
def certificate_check(self, certificate: None, valid: bool, host: str) -> bool:
|
|
163
163
|
"""
|
|
164
164
|
Certificate callback. Override with your own function to determine
|
|
165
165
|
whether to accept the server's certificate.
|
|
@@ -183,8 +183,10 @@ class RemoteCallbacks(Payload):
|
|
|
183
183
|
|
|
184
184
|
def transfer_progress(self, stats):
|
|
185
185
|
"""
|
|
186
|
-
|
|
187
|
-
|
|
186
|
+
During the download of new data, this will be regularly called with
|
|
187
|
+
the indexer's progress.
|
|
188
|
+
|
|
189
|
+
Override with your own function to report transfer progress.
|
|
188
190
|
|
|
189
191
|
Parameters:
|
|
190
192
|
|
|
@@ -192,6 +194,19 @@ class RemoteCallbacks(Payload):
|
|
|
192
194
|
The progress up to now.
|
|
193
195
|
"""
|
|
194
196
|
|
|
197
|
+
def push_transfer_progress(
|
|
198
|
+
self, objects_pushed: int, total_objects: int, bytes_pushed: int
|
|
199
|
+
):
|
|
200
|
+
"""
|
|
201
|
+
During the upload portion of a push, this will be regularly called
|
|
202
|
+
with progress information.
|
|
203
|
+
|
|
204
|
+
Be aware that this is called inline with pack building operations,
|
|
205
|
+
so performance may be affected.
|
|
206
|
+
|
|
207
|
+
Override with your own function to report push transfer progress.
|
|
208
|
+
"""
|
|
209
|
+
|
|
195
210
|
def update_tips(self, refname, old, new):
|
|
196
211
|
"""
|
|
197
212
|
Update tips callback. Override with your own function to report
|
|
@@ -355,6 +370,29 @@ def git_fetch_options(payload, opts=None):
|
|
|
355
370
|
yield payload
|
|
356
371
|
|
|
357
372
|
|
|
373
|
+
@contextmanager
|
|
374
|
+
def git_proxy_options(
|
|
375
|
+
payload: object,
|
|
376
|
+
opts: object | None = None,
|
|
377
|
+
proxy: None | bool | str = None,
|
|
378
|
+
):
|
|
379
|
+
if opts is None:
|
|
380
|
+
opts = ffi.new('git_proxy_options *')
|
|
381
|
+
C.git_proxy_options_init(opts, C.GIT_PROXY_OPTIONS_VERSION)
|
|
382
|
+
if proxy is None:
|
|
383
|
+
opts.type = C.GIT_PROXY_NONE
|
|
384
|
+
elif proxy is True:
|
|
385
|
+
opts.type = C.GIT_PROXY_AUTO
|
|
386
|
+
elif type(proxy) is str:
|
|
387
|
+
opts.type = C.GIT_PROXY_SPECIFIED
|
|
388
|
+
# Keep url in memory, otherwise memory is freed and bad things happen
|
|
389
|
+
payload.__proxy_url = ffi.new('char[]', to_bytes(proxy))
|
|
390
|
+
opts.url = payload.__proxy_url
|
|
391
|
+
else:
|
|
392
|
+
raise TypeError('Proxy must be None, True, or a string')
|
|
393
|
+
yield opts
|
|
394
|
+
|
|
395
|
+
|
|
358
396
|
@contextmanager
|
|
359
397
|
def git_push_options(payload, opts=None):
|
|
360
398
|
if payload is None:
|
|
@@ -370,6 +408,13 @@ def git_push_options(payload, opts=None):
|
|
|
370
408
|
opts.callbacks.credentials = C._credentials_cb
|
|
371
409
|
opts.callbacks.certificate_check = C._certificate_check_cb
|
|
372
410
|
opts.callbacks.push_update_reference = C._push_update_reference_cb
|
|
411
|
+
# Per libgit2 sources, push_transfer_progress may incur a performance hit.
|
|
412
|
+
# So, set it only if the user has overridden the no-op stub.
|
|
413
|
+
if (
|
|
414
|
+
type(payload).push_transfer_progress
|
|
415
|
+
is not RemoteCallbacks.push_transfer_progress
|
|
416
|
+
):
|
|
417
|
+
opts.callbacks.push_transfer_progress = C._push_transfer_progress_cb
|
|
373
418
|
# Payload
|
|
374
419
|
handle = ffi.new_handle(payload)
|
|
375
420
|
opts.callbacks.payload = handle
|
|
@@ -391,6 +436,7 @@ def git_remote_callbacks(payload):
|
|
|
391
436
|
# Plug callbacks
|
|
392
437
|
cdata.credentials = C._credentials_cb
|
|
393
438
|
cdata.update_tips = C._update_tips_cb
|
|
439
|
+
cdata.certificate_check = C._certificate_check_cb
|
|
394
440
|
# Payload
|
|
395
441
|
handle = ffi.new_handle(payload)
|
|
396
442
|
cdata.payload = handle
|
|
@@ -404,10 +450,10 @@ def git_remote_callbacks(payload):
|
|
|
404
450
|
#
|
|
405
451
|
# C callbacks
|
|
406
452
|
#
|
|
407
|
-
# These functions are called by libgit2. They cannot raise
|
|
453
|
+
# These functions are called by libgit2. They cannot raise exceptions, since
|
|
408
454
|
# they return to libgit2, they can only send back error codes.
|
|
409
455
|
#
|
|
410
|
-
# They cannot be
|
|
456
|
+
# They cannot be overridden, but sometimes the only thing these functions do is
|
|
411
457
|
# to proxy the call to a user defined function. If user defined functions
|
|
412
458
|
# raises an exception, the callback must store it somewhere and return
|
|
413
459
|
# GIT_EUSER to libgit2, then the outer Python code will be able to reraise the
|
|
@@ -553,6 +599,16 @@ def _transfer_progress_cb(stats_ptr, data):
|
|
|
553
599
|
return 0
|
|
554
600
|
|
|
555
601
|
|
|
602
|
+
@libgit2_callback
|
|
603
|
+
def _push_transfer_progress_cb(current, total, bytes_pushed, payload):
|
|
604
|
+
push_transfer_progress = getattr(payload, 'push_transfer_progress', None)
|
|
605
|
+
if not push_transfer_progress:
|
|
606
|
+
return 0
|
|
607
|
+
|
|
608
|
+
push_transfer_progress(current, total, bytes_pushed)
|
|
609
|
+
return 0
|
|
610
|
+
|
|
611
|
+
|
|
556
612
|
@libgit2_callback
|
|
557
613
|
def _update_tips_cb(refname, a, b, data):
|
|
558
614
|
update_tips = getattr(data, 'update_tips', None)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2010-
|
|
1
|
+
# Copyright 2010-2025 The pygit2 contributors
|
|
2
2
|
#
|
|
3
3
|
# This file is free software; you can redistribute it and/or modify
|
|
4
4
|
# it under the terms of the GNU General Public License, version 2,
|
|
@@ -52,6 +52,9 @@ class ConfigIterator:
|
|
|
52
52
|
def __iter__(self):
|
|
53
53
|
return self
|
|
54
54
|
|
|
55
|
+
def __next__(self):
|
|
56
|
+
return self._next_entry()
|
|
57
|
+
|
|
55
58
|
def _next_entry(self):
|
|
56
59
|
centry = ffi.new('git_config_entry **')
|
|
57
60
|
err = C.git_config_next(centry, self._iter)
|
|
@@ -59,12 +62,6 @@ class ConfigIterator:
|
|
|
59
62
|
|
|
60
63
|
return ConfigEntry._from_c(centry[0], self)
|
|
61
64
|
|
|
62
|
-
def next(self):
|
|
63
|
-
return self.__next__()
|
|
64
|
-
|
|
65
|
-
def __next__(self):
|
|
66
|
-
return self._next_entry()
|
|
67
|
-
|
|
68
65
|
|
|
69
66
|
class ConfigMultivarIterator(ConfigIterator):
|
|
70
67
|
def __next__(self):
|
|
@@ -307,7 +304,7 @@ class Config:
|
|
|
307
304
|
|
|
308
305
|
|
|
309
306
|
class ConfigEntry:
|
|
310
|
-
"""An entry in a
|
|
307
|
+
"""An entry in a configuration object."""
|
|
311
308
|
|
|
312
309
|
@classmethod
|
|
313
310
|
def _from_c(cls, ptr, iterator=None):
|
|
@@ -324,7 +321,7 @@ class ConfigEntry:
|
|
|
324
321
|
# git_config_iterator_free when we've deleted all ConfigEntry objects.
|
|
325
322
|
# But it's not, to reproduce the error comment the lines below and run
|
|
326
323
|
# the script in https://github.com/libgit2/pygit2/issues/970
|
|
327
|
-
# So instead we load the Python object
|
|
324
|
+
# So instead we load the Python object immediately. Ideally we should
|
|
328
325
|
# investigate libgit2 source code.
|
|
329
326
|
if iterator is not None:
|
|
330
327
|
entry.raw_name = entry.raw_name
|