pygit2 1.14.0__tar.gz → 1.15.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.
Files changed (189) hide show
  1. {pygit2-1.14.0 → pygit2-1.15.0}/AUTHORS.md +6 -0
  2. {pygit2-1.14.0 → pygit2-1.15.0}/CHANGELOG.md +87 -10
  3. pygit2-1.15.0/Makefile +7 -0
  4. {pygit2-1.14.0 → pygit2-1.15.0}/PKG-INFO +1 -4
  5. {pygit2-1.14.0 → pygit2-1.15.0}/README.md +0 -2
  6. {pygit2-1.14.0 → pygit2-1.15.0}/build.sh +4 -4
  7. {pygit2-1.14.0 → pygit2-1.15.0}/pygit2/__init__.py +21 -13
  8. {pygit2-1.14.0 → pygit2-1.15.0}/pygit2/_build.py +2 -2
  9. {pygit2-1.14.0 → pygit2-1.15.0}/pygit2/_pygit2.pyi +175 -54
  10. {pygit2-1.14.0 → pygit2-1.15.0}/pygit2/_run.py +2 -2
  11. {pygit2-1.14.0 → pygit2-1.15.0}/pygit2/blame.py +14 -7
  12. {pygit2-1.14.0 → pygit2-1.15.0}/pygit2/blob.py +3 -3
  13. {pygit2-1.14.0 → pygit2-1.15.0}/pygit2/branches.py +3 -2
  14. {pygit2-1.14.0 → pygit2-1.15.0}/pygit2/callbacks.py +59 -30
  15. {pygit2-1.14.0 → pygit2-1.15.0}/pygit2/config.py +18 -23
  16. {pygit2-1.14.0 → pygit2-1.15.0}/pygit2/decl/config.h +5 -3
  17. {pygit2-1.14.0 → pygit2-1.15.0}/pygit2/decl/remote.h +2 -1
  18. {pygit2-1.14.0 → pygit2-1.15.0}/pygit2/decl/strarray.h +1 -1
  19. {pygit2-1.14.0 → pygit2-1.15.0}/pygit2/enums.py +145 -164
  20. {pygit2-1.14.0 → pygit2-1.15.0}/pygit2/errors.py +4 -2
  21. {pygit2-1.14.0 → pygit2-1.15.0}/pygit2/filter.py +3 -9
  22. {pygit2-1.14.0 → pygit2-1.15.0}/pygit2/index.py +34 -35
  23. pygit2-1.15.0/pygit2/legacyenums.py +113 -0
  24. {pygit2-1.14.0 → pygit2-1.15.0}/pygit2/packbuilder.py +0 -2
  25. {pygit2-1.14.0 → pygit2-1.15.0}/pygit2/references.py +4 -3
  26. {pygit2-1.14.0 → pygit2-1.15.0}/pygit2/refspec.py +1 -2
  27. {pygit2-1.14.0 → pygit2-1.15.0}/pygit2/remotes.py +50 -55
  28. {pygit2-1.14.0 → pygit2-1.15.0}/pygit2/repository.py +147 -147
  29. {pygit2-1.14.0 → pygit2-1.15.0}/pygit2/settings.py +0 -1
  30. {pygit2-1.14.0 → pygit2-1.15.0}/pygit2/submodules.py +28 -20
  31. {pygit2-1.14.0 → pygit2-1.15.0}/pygit2/utils.py +48 -13
  32. {pygit2-1.14.0 → pygit2-1.15.0}/pyproject.toml +17 -4
  33. {pygit2-1.14.0 → pygit2-1.15.0}/setup.py +20 -21
  34. {pygit2-1.14.0 → pygit2-1.15.0}/src/blob.c +1 -0
  35. {pygit2-1.14.0 → pygit2-1.15.0}/src/filter.c +1 -0
  36. {pygit2-1.14.0 → pygit2-1.15.0}/src/object.c +6 -28
  37. {pygit2-1.14.0 → pygit2-1.15.0}/src/odb.c +8 -5
  38. {pygit2-1.14.0 → pygit2-1.15.0}/src/odb_backend.c +6 -4
  39. {pygit2-1.14.0 → pygit2-1.15.0}/src/oid.c +16 -16
  40. {pygit2-1.14.0 → pygit2-1.15.0}/src/options.c +6 -4
  41. {pygit2-1.14.0 → pygit2-1.15.0}/src/pygit2.c +5 -15
  42. {pygit2-1.14.0 → pygit2-1.15.0}/src/reference.c +13 -9
  43. {pygit2-1.14.0 → pygit2-1.15.0}/src/repository.c +31 -34
  44. {pygit2-1.14.0 → pygit2-1.15.0}/src/tree.c +6 -4
  45. {pygit2-1.14.0 → pygit2-1.15.0}/src/treebuilder.c +6 -4
  46. {pygit2-1.14.0 → pygit2-1.15.0}/src/types.h +2 -2
  47. {pygit2-1.14.0 → pygit2-1.15.0}/src/utils.c +10 -96
  48. {pygit2-1.14.0 → pygit2-1.15.0}/src/utils.h +1 -3
  49. {pygit2-1.14.0 → pygit2-1.15.0}/test/__init__.py +1 -0
  50. {pygit2-1.14.0 → pygit2-1.15.0}/test/conftest.py +6 -4
  51. {pygit2-1.14.0 → pygit2-1.15.0}/test/test_apply_diff.py +11 -0
  52. {pygit2-1.14.0 → pygit2-1.15.0}/test/test_archive.py +3 -0
  53. {pygit2-1.14.0 → pygit2-1.15.0}/test/test_attributes.py +1 -1
  54. {pygit2-1.14.0 → pygit2-1.15.0}/test/test_blame.py +34 -14
  55. {pygit2-1.14.0 → pygit2-1.15.0}/test/test_blob.py +28 -12
  56. {pygit2-1.14.0 → pygit2-1.15.0}/test/test_branch.py +51 -33
  57. {pygit2-1.14.0 → pygit2-1.15.0}/test/test_branch_empty.py +18 -12
  58. {pygit2-1.14.0 → pygit2-1.15.0}/test/test_cherrypick.py +11 -5
  59. {pygit2-1.14.0 → pygit2-1.15.0}/test/test_commit.py +84 -49
  60. {pygit2-1.14.0 → pygit2-1.15.0}/test/test_commit_gpg.py +16 -16
  61. {pygit2-1.14.0 → pygit2-1.15.0}/test/test_config.py +38 -33
  62. {pygit2-1.14.0 → pygit2-1.15.0}/test/test_credentials.py +44 -34
  63. {pygit2-1.14.0 → pygit2-1.15.0}/test/test_describe.py +22 -6
  64. {pygit2-1.14.0 → pygit2-1.15.0}/test/test_diff.py +45 -18
  65. {pygit2-1.14.0 → pygit2-1.15.0}/test/test_diff_binary.py +1 -0
  66. {pygit2-1.14.0 → pygit2-1.15.0}/test/test_filter.py +21 -24
  67. {pygit2-1.14.0 → pygit2-1.15.0}/test/test_index.py +53 -27
  68. {pygit2-1.14.0 → pygit2-1.15.0}/test/test_mailmap.py +20 -20
  69. {pygit2-1.14.0 → pygit2-1.15.0}/test/test_merge.py +86 -76
  70. {pygit2-1.14.0 → pygit2-1.15.0}/test/test_note.py +24 -14
  71. {pygit2-1.14.0 → pygit2-1.15.0}/test/test_object.py +23 -15
  72. {pygit2-1.14.0 → pygit2-1.15.0}/test/test_odb.py +7 -3
  73. {pygit2-1.14.0 → pygit2-1.15.0}/test/test_odb_backend.py +11 -5
  74. {pygit2-1.14.0 → pygit2-1.15.0}/test/test_oid.py +24 -12
  75. {pygit2-1.14.0 → pygit2-1.15.0}/test/test_options.py +29 -15
  76. {pygit2-1.14.0 → pygit2-1.15.0}/test/test_packbuilder.py +3 -2
  77. {pygit2-1.14.0 → pygit2-1.15.0}/test/test_patch.py +18 -10
  78. {pygit2-1.14.0 → pygit2-1.15.0}/test/test_patch_encoding.py +2 -0
  79. {pygit2-1.14.0 → pygit2-1.15.0}/test/test_refdb_backend.py +13 -6
  80. {pygit2-1.14.0 → pygit2-1.15.0}/test/test_refs.py +191 -115
  81. {pygit2-1.14.0 → pygit2-1.15.0}/test/test_remote.py +100 -32
  82. {pygit2-1.14.0 → pygit2-1.15.0}/test/test_remote_prune.py +4 -0
  83. {pygit2-1.14.0 → pygit2-1.15.0}/test/test_remote_utf8.py +1 -0
  84. {pygit2-1.14.0 → pygit2-1.15.0}/test/test_repository.py +174 -99
  85. {pygit2-1.14.0 → pygit2-1.15.0}/test/test_repository_bare.py +51 -24
  86. {pygit2-1.14.0 → pygit2-1.15.0}/test/test_repository_custom.py +5 -2
  87. {pygit2-1.14.0 → pygit2-1.15.0}/test/test_repository_empty.py +2 -0
  88. {pygit2-1.14.0 → pygit2-1.15.0}/test/test_revparse.py +15 -16
  89. {pygit2-1.14.0 → pygit2-1.15.0}/test/test_revwalk.py +17 -8
  90. {pygit2-1.14.0 → pygit2-1.15.0}/test/test_signature.py +22 -8
  91. {pygit2-1.14.0 → pygit2-1.15.0}/test/test_status.py +15 -18
  92. {pygit2-1.14.0 → pygit2-1.15.0}/test/test_submodule.py +25 -15
  93. {pygit2-1.14.0 → pygit2-1.15.0}/test/test_tag.py +17 -8
  94. {pygit2-1.14.0 → pygit2-1.15.0}/test/test_tree.py +19 -7
  95. {pygit2-1.14.0 → pygit2-1.15.0}/test/test_treebuilder.py +1 -1
  96. {pygit2-1.14.0 → pygit2-1.15.0}/test/utils.py +16 -22
  97. pygit2-1.14.0/Makefile +0 -7
  98. pygit2-1.14.0/pygit2/legacyenums.py +0 -109
  99. {pygit2-1.14.0 → pygit2-1.15.0}/COPYING +0 -0
  100. {pygit2-1.14.0 → pygit2-1.15.0}/SPONSORS.md +1 -1
  101. {pygit2-1.14.0 → pygit2-1.15.0}/build_tag.py +0 -0
  102. {pygit2-1.14.0 → pygit2-1.15.0}/mypy-stubtest.ini +0 -0
  103. {pygit2-1.14.0 → pygit2-1.15.0}/pygit2/credentials.py +0 -0
  104. {pygit2-1.14.0 → pygit2-1.15.0}/pygit2/decl/attr.h +0 -0
  105. {pygit2-1.14.0 → pygit2-1.15.0}/pygit2/decl/blame.h +0 -0
  106. {pygit2-1.14.0 → pygit2-1.15.0}/pygit2/decl/buffer.h +0 -0
  107. {pygit2-1.14.0 → pygit2-1.15.0}/pygit2/decl/callbacks.h +0 -0
  108. {pygit2-1.14.0 → pygit2-1.15.0}/pygit2/decl/checkout.h +0 -0
  109. {pygit2-1.14.0 → pygit2-1.15.0}/pygit2/decl/clone.h +0 -0
  110. {pygit2-1.14.0 → pygit2-1.15.0}/pygit2/decl/commit.h +0 -0
  111. {pygit2-1.14.0 → pygit2-1.15.0}/pygit2/decl/common.h +0 -0
  112. {pygit2-1.14.0 → pygit2-1.15.0}/pygit2/decl/describe.h +0 -0
  113. {pygit2-1.14.0 → pygit2-1.15.0}/pygit2/decl/diff.h +0 -0
  114. {pygit2-1.14.0 → pygit2-1.15.0}/pygit2/decl/errors.h +0 -0
  115. {pygit2-1.14.0 → pygit2-1.15.0}/pygit2/decl/graph.h +0 -0
  116. {pygit2-1.14.0 → pygit2-1.15.0}/pygit2/decl/index.h +0 -0
  117. {pygit2-1.14.0 → pygit2-1.15.0}/pygit2/decl/indexer.h +0 -0
  118. {pygit2-1.14.0 → pygit2-1.15.0}/pygit2/decl/merge.h +0 -0
  119. {pygit2-1.14.0 → pygit2-1.15.0}/pygit2/decl/net.h +0 -0
  120. {pygit2-1.14.0 → pygit2-1.15.0}/pygit2/decl/oid.h +0 -0
  121. {pygit2-1.14.0 → pygit2-1.15.0}/pygit2/decl/pack.h +0 -0
  122. {pygit2-1.14.0 → pygit2-1.15.0}/pygit2/decl/proxy.h +0 -0
  123. {pygit2-1.14.0 → pygit2-1.15.0}/pygit2/decl/refspec.h +0 -0
  124. {pygit2-1.14.0 → pygit2-1.15.0}/pygit2/decl/repository.h +0 -0
  125. {pygit2-1.14.0 → pygit2-1.15.0}/pygit2/decl/revert.h +0 -0
  126. {pygit2-1.14.0 → pygit2-1.15.0}/pygit2/decl/stash.h +0 -0
  127. {pygit2-1.14.0 → pygit2-1.15.0}/pygit2/decl/submodule.h +0 -0
  128. {pygit2-1.14.0 → pygit2-1.15.0}/pygit2/decl/transport.h +0 -0
  129. {pygit2-1.14.0 → pygit2-1.15.0}/pygit2/decl/types.h +0 -0
  130. {pygit2-1.14.0 → pygit2-1.15.0}/pygit2/ffi.py +0 -0
  131. {pygit2-1.14.0 → pygit2-1.15.0}/pytest.ini +0 -0
  132. {pygit2-1.14.0 → pygit2-1.15.0}/requirements-test.txt +0 -0
  133. {pygit2-1.14.0 → pygit2-1.15.0}/requirements.txt +0 -0
  134. {pygit2-1.14.0 → pygit2-1.15.0}/setup.cfg +0 -0
  135. {pygit2-1.14.0 → pygit2-1.15.0}/src/branch.c +0 -0
  136. {pygit2-1.14.0 → pygit2-1.15.0}/src/branch.h +0 -0
  137. {pygit2-1.14.0 → pygit2-1.15.0}/src/commit.c +0 -0
  138. {pygit2-1.14.0 → pygit2-1.15.0}/src/diff.c +0 -0
  139. {pygit2-1.14.0 → pygit2-1.15.0}/src/diff.h +0 -0
  140. {pygit2-1.14.0 → pygit2-1.15.0}/src/error.c +0 -0
  141. {pygit2-1.14.0 → pygit2-1.15.0}/src/error.h +0 -0
  142. {pygit2-1.14.0 → pygit2-1.15.0}/src/filter.h +0 -0
  143. {pygit2-1.14.0 → pygit2-1.15.0}/src/mailmap.c +0 -0
  144. {pygit2-1.14.0 → pygit2-1.15.0}/src/mailmap.h +0 -0
  145. {pygit2-1.14.0 → pygit2-1.15.0}/src/note.c +0 -0
  146. {pygit2-1.14.0 → pygit2-1.15.0}/src/note.h +0 -0
  147. {pygit2-1.14.0 → pygit2-1.15.0}/src/object.h +0 -0
  148. {pygit2-1.14.0 → pygit2-1.15.0}/src/odb.h +0 -0
  149. {pygit2-1.14.0 → pygit2-1.15.0}/src/odb_backend.h +0 -0
  150. {pygit2-1.14.0 → pygit2-1.15.0}/src/oid.h +0 -0
  151. {pygit2-1.14.0 → pygit2-1.15.0}/src/options.h +0 -0
  152. {pygit2-1.14.0 → pygit2-1.15.0}/src/patch.c +0 -0
  153. {pygit2-1.14.0 → pygit2-1.15.0}/src/patch.h +0 -0
  154. {pygit2-1.14.0 → pygit2-1.15.0}/src/refdb.c +0 -0
  155. {pygit2-1.14.0 → pygit2-1.15.0}/src/refdb.h +0 -0
  156. {pygit2-1.14.0 → pygit2-1.15.0}/src/refdb_backend.c +0 -0
  157. {pygit2-1.14.0 → pygit2-1.15.0}/src/refdb_backend.h +0 -0
  158. {pygit2-1.14.0 → pygit2-1.15.0}/src/reference.h +0 -0
  159. {pygit2-1.14.0 → pygit2-1.15.0}/src/repository.h +0 -0
  160. {pygit2-1.14.0 → pygit2-1.15.0}/src/revspec.c +0 -0
  161. {pygit2-1.14.0 → pygit2-1.15.0}/src/revspec.h +0 -0
  162. {pygit2-1.14.0 → pygit2-1.15.0}/src/signature.c +0 -0
  163. {pygit2-1.14.0 → pygit2-1.15.0}/src/signature.h +0 -0
  164. {pygit2-1.14.0 → pygit2-1.15.0}/src/stash.c +0 -0
  165. {pygit2-1.14.0 → pygit2-1.15.0}/src/tag.c +0 -0
  166. {pygit2-1.14.0 → pygit2-1.15.0}/src/tree.h +0 -0
  167. {pygit2-1.14.0 → pygit2-1.15.0}/src/treebuilder.h +0 -0
  168. {pygit2-1.14.0 → pygit2-1.15.0}/src/walker.c +0 -0
  169. {pygit2-1.14.0 → pygit2-1.15.0}/src/walker.h +0 -0
  170. {pygit2-1.14.0 → pygit2-1.15.0}/src/wildmatch.c +0 -0
  171. {pygit2-1.14.0 → pygit2-1.15.0}/src/wildmatch.h +0 -0
  172. {pygit2-1.14.0 → pygit2-1.15.0}/src/worktree.c +0 -0
  173. {pygit2-1.14.0 → pygit2-1.15.0}/src/worktree.h +0 -0
  174. {pygit2-1.14.0 → pygit2-1.15.0}/test/data/barerepo.zip +0 -0
  175. {pygit2-1.14.0 → pygit2-1.15.0}/test/data/binaryfilerepo.zip +0 -0
  176. {pygit2-1.14.0 → pygit2-1.15.0}/test/data/blameflagsrepo.zip +0 -0
  177. {pygit2-1.14.0 → pygit2-1.15.0}/test/data/dirtyrepo.zip +0 -0
  178. {pygit2-1.14.0 → pygit2-1.15.0}/test/data/emptyrepo.zip +0 -0
  179. {pygit2-1.14.0 → pygit2-1.15.0}/test/data/encoding.zip +0 -0
  180. {pygit2-1.14.0 → pygit2-1.15.0}/test/data/gpgsigned.zip +0 -0
  181. {pygit2-1.14.0 → pygit2-1.15.0}/test/data/submodulerepo.zip +0 -0
  182. {pygit2-1.14.0 → pygit2-1.15.0}/test/data/testrepo.zip +0 -0
  183. {pygit2-1.14.0 → pygit2-1.15.0}/test/data/testrepoformerging.zip +0 -0
  184. {pygit2-1.14.0 → pygit2-1.15.0}/test/data/testrepopacked.zip +0 -0
  185. {pygit2-1.14.0 → pygit2-1.15.0}/test/data/trailerrepo.zip +0 -0
  186. {pygit2-1.14.0 → pygit2-1.15.0}/test/data/utf8branchrepo.zip +0 -0
  187. {pygit2-1.14.0 → pygit2-1.15.0}/test/keys/pygit2_empty +0 -0
  188. {pygit2-1.14.0 → pygit2-1.15.0}/test/keys/pygit2_empty.pub +0 -0
  189. {pygit2-1.14.0 → pygit2-1.15.0}/test/test_commit_trailer.py +0 -0
@@ -72,6 +72,7 @@ Authors:
72
72
  Jason Ziglar
73
73
  Leonardo Rhodes
74
74
  Mark Adams
75
+ Michał Kępień
75
76
  Nika Layzell
76
77
  Peter-Yi Zhang
77
78
  Petr Viktorin
@@ -81,6 +82,7 @@ Authors:
81
82
  Sukhman Bhuller
82
83
  Thomas Kluyver
83
84
  Tyler Cipriani
85
+ WANG Xuerui
84
86
  Alex Chamberlain
85
87
  Alexander Bayandin
86
88
  Amit Bakshi
@@ -161,6 +163,7 @@ Authors:
161
163
  Erik van Zijst
162
164
  Fabrice Salvaire
163
165
  Ferengee
166
+ Florian Weimer
164
167
  Frazer McLean
165
168
  Gustavo Di Pietro
166
169
  Holger Frey
@@ -184,10 +187,12 @@ Authors:
184
187
  Mathieu Parent
185
188
  Mathieu Pillard
186
189
  Matthaus Woolard
190
+ Maxwell G
187
191
  Michał Górny
188
192
  Nicolás Sanguinetti
189
193
  Nikita Kartashov
190
194
  Nikolai Zujev
195
+ Nils Philippsen
191
196
  Noah Fontes
192
197
  Óscar San José
193
198
  Patrick Lühne
@@ -211,6 +216,7 @@ Authors:
211
216
  Tad Hardesty
212
217
  Timo Röhling
213
218
  Vladimir Rutsky
219
+ Wim Jeantine-Glenn
214
220
  Yu Jianjian
215
221
  buhl
216
222
  chengyuhang
@@ -1,7 +1,81 @@
1
+ # 1.15.0 (2024-05-18)
2
+
3
+ - Many deprecated features have been removed, see below
4
+
5
+ - Upgrade to libgit2 v1.8.1
6
+
7
+ - New `push_options` optional argument in `Repository.push(...)`
8
+ [#1282](https://github.com/libgit2/pygit2/pull/1282)
9
+
10
+ - New support comparison of `Oid` with text string
11
+
12
+ - Fix `CheckoutNotify.IGNORED`
13
+ [#1288](https://github.com/libgit2/pygit2/issues/1288)
14
+
15
+ - Use default error handler when decoding/encoding paths
16
+ [#537](https://github.com/libgit2/pygit2/issues/537)
17
+
18
+ - Remove setuptools runtime dependency
19
+ [#1281](https://github.com/libgit2/pygit2/pull/1281)
20
+
21
+ - Coding style with ruff
22
+ [#1280](https://github.com/libgit2/pygit2/pull/1280)
23
+
24
+ - Add wheels for ppc64le
25
+ [#1279](https://github.com/libgit2/pygit2/pull/1279)
26
+
27
+ - Fix tests on EPEL8 builds for s390x
28
+ [#1283](https://github.com/libgit2/pygit2/pull/1283)
29
+
30
+ Deprecations:
31
+
32
+ - Deprecate `IndexEntry.hex`, use `str(IndexEntry.id)`
33
+
34
+ Breaking changes:
35
+
36
+ - Remove deprecated `oid.hex`, use `str(oid)`
37
+ - Remove deprecated `object.hex`, use `str(object.id)`
38
+ - Remove deprecated `object.oid`, use `object.id`
39
+
40
+ - Remove deprecated `Repository.add_submodule(...)`, use `Repository.submodules.add(...)`
41
+ - Remove deprecated `Repository.lookup_submodule(...)`, use `Repository.submodules[...]`
42
+ - Remove deprecated `Repository.init_submodules(...)`, use `Repository.submodules.init(...)`
43
+ - Remove deprecated `Repository.update_submodule(...)`, use `Repository.submodules.update(...)`
44
+
45
+ - Remove deprecated constants `GIT_OBJ_XXX`, use `ObjectType`
46
+ - Remove deprecated constants `GIT_REVPARSE_XXX`, use `RevSpecFlag`
47
+ - Remove deprecated constants `GIT_REF_XXX`, use `ReferenceType`
48
+ - Remove deprecated `ReferenceType.OID`, use instead `ReferenceType.DIRECT`
49
+ - Remove deprecated `ReferenceType.LISTALL`, use instead `ReferenceType.ALL`
50
+
51
+ - Remove deprecated support for passing dicts to repository\'s `merge(...)`,
52
+ `merge_commits(...)` and `merge_trees(...)`. Instead pass `MergeFlag` for `flags`, and
53
+ `MergeFileFlag` for `file_flags`.
54
+
55
+ - Remove deprecated support for passing a string for the favor argument to repository\'s
56
+ `merge(...)`, `merge_commits(...)` and `merge_trees(...)`. Instead pass `MergeFavor`.
57
+
58
+
59
+ # 1.14.1 (2024-02-10)
60
+
61
+ - Update wheels to libgit2 v1.7.2
62
+
63
+ - Now `Object.filemode` returns `enums.FileMode` and `Reference.type` returns
64
+ `enums.ReferenceType`
65
+ [#1273](https://github.com/libgit2/pygit2/pull/1273)
66
+
67
+ - Fix tests on Fedora 40
68
+ [#1275](https://github.com/libgit2/pygit2/pull/1275)
69
+
70
+ Deprecations:
71
+
72
+ - Deprecate `ReferenceType.OID`, use `ReferenceType.DIRECT`
73
+ - Deprecate `ReferenceType.LISTALL`, use `ReferenceType.ALL`
74
+
1
75
  # 1.14.0 (2024-01-26)
2
76
 
3
77
  - Drop support for Python 3.8
4
- - Add Linux wheels for musl on x86_64
78
+ - Add Linux wheels for musl on x86\_64
5
79
  [#1266](https://github.com/libgit2/pygit2/pull/1266)
6
80
  - New `Repository.submodules` namespace
7
81
  [#1250](https://github.com/libgit2/pygit2/pull/1250)
@@ -33,15 +107,18 @@ Breaking changes:
33
107
 
34
108
  Deprecations:
35
109
 
36
- - Deprecate `Repository.add_submodule(...)`, use `Repository.submodules.add(...)`
37
- - Deprecate `Repository.lookup_submodule(...)`, use `Repository.submodules[...]`
38
- - Deprecate `Repository.init_submodules(...)`, use `Repository.submodules.init(...)`
39
- - Deprecate `Repository.update_submodule(...)`, use `Repository.submodules.update(...)`
40
- - Deprecate `GIT_*` constants, use `pygit2.enums`
41
- - Passign dicts to repository\'s `merge(...)`, `merge_commits(...)`
42
- and `merge_trees(...)` is deprecated. Instead pass `MergeFavor` for
43
- the `favor` argument, `MergeFlag` for `flags`, and `MergeFileFlag`
44
- for `file_flags`.
110
+ - Deprecate `Repository.add_submodule(...)`, use `Repository.submodules.add(...)`
111
+ - Deprecate `Repository.lookup_submodule(...)`, use `Repository.submodules[...]`
112
+ - Deprecate `Repository.init_submodules(...)`, use `Repository.submodules.init(...)`
113
+ - Deprecate `Repository.update_submodule(...)`, use `Repository.submodules.update(...)`
114
+ - Deprecate `GIT_*` constants, use `pygit2.enums`
115
+
116
+ - Passing dicts to repository\'s `merge(...)`, `merge_commits(...)` and `merge_trees(...)`
117
+ is deprecated. Instead pass `MergeFlag` for the `flags` argument, and `MergeFileFlag` for
118
+ `file_flags`.
119
+
120
+ - Passing a string for the favor argument to repository\'s `merge(...)`, `merge_commits(...)`
121
+ and `merge_trees(...)` is deprecated. Instead pass `MergeFavor`.
45
122
 
46
123
  # 1.13.3 (2023-11-21)
47
124
 
pygit2-1.15.0/Makefile ADDED
@@ -0,0 +1,7 @@
1
+ .PHONY: build html
2
+
3
+ build:
4
+ OPENSSL_VERSION=3.1.5 LIBSSH2_VERSION=1.11.0 LIBGIT2_VERSION=1.8.1 sh build.sh
5
+
6
+ html: build
7
+ make -C docs html
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pygit2
3
- Version: 1.14.0
3
+ Version: 1.15.0
4
4
  Summary: Python bindings for libgit2.
5
5
  Home-page: https://github.com/libgit2/pygit2
6
6
  Maintainer: J. David Ibáñez
@@ -26,7 +26,6 @@ Description-Content-Type: text/markdown
26
26
  License-File: COPYING
27
27
  License-File: AUTHORS.md
28
28
  Requires-Dist: cffi>=1.16.0
29
- Requires-Dist: setuptools; python_version >= "3.12"
30
29
 
31
30
  # pygit2 - libgit2 bindings in Python
32
31
 
@@ -48,8 +47,6 @@ Supports Python 3.9 to 3.12 and PyPy3 7.3+
48
47
 
49
48
  ## Sponsors
50
49
 
51
- - [Iterative](https://iterative.ai/)
52
-
53
50
  Add your name and link here, [become a
54
51
  sponsor](https://github.com/sponsors/jdavid).
55
52
 
@@ -18,8 +18,6 @@ Supports Python 3.9 to 3.12 and PyPy3 7.3+
18
18
 
19
19
  ## Sponsors
20
20
 
21
- - [Iterative](https://iterative.ai/)
22
-
23
21
  Add your name and link here, [become a
24
22
  sponsor](https://github.com/sponsors/jdavid).
25
23
 
@@ -22,14 +22,14 @@
22
22
  #
23
23
  # sh build.sh
24
24
  #
25
- # Build libgit2 1.7.1 (will use libssh2 if available), then build pygit2
25
+ # Build libgit2 1.8.1 (will use libssh2 if available), then build pygit2
26
26
  # inplace:
27
27
  #
28
- # LIBGIT2_VERSION=1.7.1 sh build.sh
28
+ # LIBGIT2_VERSION=1.8.1 sh build.sh
29
29
  #
30
- # Build libssh2 1.11.0 and libgit2 1.7.1, then build pygit2 inplace:
30
+ # Build libssh2 1.11.0 and libgit2 1.8.1, then build pygit2 inplace:
31
31
  #
32
- # LIBSSH2_VERSION=1.11.0 LIBGIT2_VERSION=1.7.1 sh build.sh
32
+ # LIBSSH2_VERSION=1.11.0 LIBGIT2_VERSION=1.8.1 sh build.sh
33
33
  #
34
34
  # Build inplace and run the tests:
35
35
  #
@@ -66,15 +66,17 @@ _cache_enums()
66
66
 
67
67
 
68
68
  def init_repository(
69
- path: typing.Union[str, bytes, PathLike, None],
70
- bare: bool = False,
71
- flags: enums.RepositoryInitFlag = enums.RepositoryInitFlag.MKPATH,
72
- mode: typing.Union[int, enums.RepositoryInitMode] = enums.RepositoryInitMode.SHARED_UMASK,
73
- workdir_path: typing.Optional[str] = None,
74
- description: typing.Optional[str] = None,
75
- template_path: typing.Optional[str] = None,
76
- initial_head: typing.Optional[str] = None,
77
- origin_url: typing.Optional[str] = None
69
+ path: typing.Union[str, bytes, PathLike, None],
70
+ bare: bool = False,
71
+ flags: enums.RepositoryInitFlag = enums.RepositoryInitFlag.MKPATH,
72
+ mode: typing.Union[
73
+ int, enums.RepositoryInitMode
74
+ ] = enums.RepositoryInitMode.SHARED_UMASK,
75
+ workdir_path: typing.Optional[str] = None,
76
+ description: typing.Optional[str] = None,
77
+ template_path: typing.Optional[str] = None,
78
+ initial_head: typing.Optional[str] = None,
79
+ origin_url: typing.Optional[str] = None,
78
80
  ) -> Repository:
79
81
  """
80
82
  Creates a new Git repository in the given *path*.
@@ -108,8 +110,7 @@ def init_repository(
108
110
 
109
111
  # Options
110
112
  options = ffi.new('git_repository_init_options *')
111
- C.git_repository_init_options_init(options,
112
- C.GIT_REPOSITORY_INIT_OPTIONS_VERSION)
113
+ C.git_repository_init_options_init(options, C.GIT_REPOSITORY_INIT_OPTIONS_VERSION)
113
114
  options.flags = int(flags)
114
115
  options.mode = mode
115
116
 
@@ -143,8 +144,15 @@ def init_repository(
143
144
 
144
145
 
145
146
  def clone_repository(
146
- url, path, bare=False, repository=None, remote=None,
147
- checkout_branch=None, callbacks=None, depth=0):
147
+ url,
148
+ path,
149
+ bare=False,
150
+ repository=None,
151
+ remote=None,
152
+ checkout_branch=None,
153
+ callbacks=None,
154
+ depth=0,
155
+ ):
148
156
  """
149
157
  Clones a new Git repository from *url* in the given *path*.
150
158
 
@@ -34,7 +34,7 @@ from pathlib import Path
34
34
  #
35
35
  # The version number of pygit2
36
36
  #
37
- __version__ = '1.14.0'
37
+ __version__ = '1.15.0'
38
38
 
39
39
 
40
40
  #
@@ -70,5 +70,5 @@ def get_libgit2_paths():
70
70
  'libraries': ['git2'],
71
71
  'include_dirs': [str(x) for x in include_dirs],
72
72
  'library_dirs': [str(x) for x in library_dirs],
73
- }
73
+ },
74
74
  )
@@ -15,6 +15,7 @@ from .enums import (
15
15
  ObjectType,
16
16
  Option,
17
17
  ReferenceFilter,
18
+ ReferenceType,
18
19
  ResetMode,
19
20
  SortMode,
20
21
  )
@@ -34,25 +35,25 @@ LIBGIT2_VER_REVISION: int
34
35
 
35
36
  class Object:
36
37
  _pointer: bytes
37
- filemode: int
38
+ filemode: FileMode
38
39
  hex: str
39
40
  id: Oid
40
41
  name: str | None
41
42
  oid: Oid
42
43
  raw_name: bytes | None
43
44
  short_id: str
44
- type: "Literal[GIT_OBJ_COMMIT] | Literal[GIT_OBJ_TREE] | Literal[GIT_OBJ_TAG] | Literal[GIT_OBJ_BLOB]"
45
+ type: 'Literal[GIT_OBJ_COMMIT] | Literal[GIT_OBJ_TREE] | Literal[GIT_OBJ_TAG] | Literal[GIT_OBJ_BLOB]'
45
46
  type_str: "Literal['commit'] | Literal['tree'] | Literal['tag'] | Literal['blob']"
46
47
  @overload
47
- def peel(self, target_type: "Literal[GIT_OBJ_COMMIT]") -> "Commit": ...
48
+ def peel(self, target_type: 'Literal[GIT_OBJ_COMMIT]') -> 'Commit': ...
48
49
  @overload
49
- def peel(self, target_type: "Literal[GIT_OBJ_TREE]") -> "Tree": ...
50
+ def peel(self, target_type: 'Literal[GIT_OBJ_TREE]') -> 'Tree': ...
50
51
  @overload
51
- def peel(self, target_type: "Literal[GIT_OBJ_TAG]") -> "Tag": ...
52
+ def peel(self, target_type: 'Literal[GIT_OBJ_TAG]') -> 'Tag': ...
52
53
  @overload
53
- def peel(self, target_type: "Literal[GIT_OBJ_BLOB]") -> "Blob": ...
54
+ def peel(self, target_type: 'Literal[GIT_OBJ_BLOB]') -> 'Blob': ...
54
55
  @overload
55
- def peel(self, target_type: "None") -> "Commit|Tree|Blob": ...
56
+ def peel(self, target_type: 'None') -> 'Commit|Tree|Blob': ...
56
57
  def read_raw(self) -> bytes: ...
57
58
  def __eq__(self, other) -> bool: ...
58
59
  def __ge__(self, other) -> bool: ...
@@ -69,20 +70,20 @@ class Reference:
69
70
  raw_target: Oid | bytes
70
71
  shorthand: str
71
72
  target: Oid | str
72
- type: int
73
+ type: ReferenceType
73
74
  def __init__(self, *args) -> None: ...
74
75
  def delete(self) -> None: ...
75
76
  def log(self) -> Iterator[RefLogEntry]: ...
76
77
  @overload
77
- def peel(self, type: "Literal[GIT_OBJ_COMMIT]") -> "Commit": ...
78
+ def peel(self, type: 'Literal[GIT_OBJ_COMMIT]') -> 'Commit': ...
78
79
  @overload
79
- def peel(self, type: "Literal[GIT_OBJ_TREE]") -> "Tree": ...
80
+ def peel(self, type: 'Literal[GIT_OBJ_TREE]') -> 'Tree': ...
80
81
  @overload
81
- def peel(self, type: "Literal[GIT_OBJ_TAG]") -> "Tag": ...
82
+ def peel(self, type: 'Literal[GIT_OBJ_TAG]') -> 'Tag': ...
82
83
  @overload
83
- def peel(self, type: "Literal[GIT_OBJ_BLOB]") -> "Blob": ...
84
+ def peel(self, type: 'Literal[GIT_OBJ_BLOB]') -> 'Blob': ...
84
85
  @overload
85
- def peel(self, type: "None") -> "Commit|Tree|Blob": ...
86
+ def peel(self, type: 'None') -> 'Commit|Tree|Blob': ...
86
87
  def rename(self, new_name: str) -> None: ...
87
88
  def resolve(self) -> Reference: ...
88
89
  def set_target(self, target: _OidArg, message: str = ...) -> None: ...
@@ -99,8 +100,20 @@ class Blob(Object):
99
100
  data: bytes
100
101
  is_binary: bool
101
102
  size: int
102
- def diff(self, blob: Blob = ..., flag: int = ..., old_as_path: str = ..., new_as_path: str = ...) -> Patch: ...
103
- def diff_to_buffer(self, buffer: Optional[bytes] = None, flag: DiffOption = DiffOption.NORMAL, old_as_path: str = ..., buffer_as_path: str = ...) -> Patch: ...
103
+ def diff(
104
+ self,
105
+ blob: Blob = ...,
106
+ flag: int = ...,
107
+ old_as_path: str = ...,
108
+ new_as_path: str = ...,
109
+ ) -> Patch: ...
110
+ def diff_to_buffer(
111
+ self,
112
+ buffer: Optional[bytes] = None,
113
+ flag: DiffOption = DiffOption.NORMAL,
114
+ old_as_path: str = ...,
115
+ buffer_as_path: str = ...,
116
+ ) -> Patch: ...
104
117
 
105
118
  class Branch(Reference):
106
119
  branch_name: str
@@ -133,7 +146,15 @@ class Diff:
133
146
  patch: str | None
134
147
  patchid: Oid
135
148
  stats: DiffStats
136
- def find_similar(self, flags: DiffFind = DiffFind.FIND_BY_CONFIG, rename_threshold : int = 50, copy_threshold : int = 50, rename_from_rewrite_threshold: int = 50, break_rewrite_threshold: int = 60, rename_limit: int = 1000) -> None: ...
149
+ def find_similar(
150
+ self,
151
+ flags: DiffFind = DiffFind.FIND_BY_CONFIG,
152
+ rename_threshold: int = 50,
153
+ copy_threshold: int = 50,
154
+ rename_from_rewrite_threshold: int = 50,
155
+ break_rewrite_threshold: int = 60,
156
+ rename_limit: int = 1000,
157
+ ) -> None: ...
137
158
  def merge(self, diff: Diff) -> None: ...
138
159
  @staticmethod
139
160
  def from_c(diff, repo) -> Diff: ...
@@ -187,24 +208,31 @@ class DiffStats:
187
208
  def format(self, format: DiffStatsFormat, width: int) -> str: ...
188
209
 
189
210
  class GitError(Exception): ...
190
-
191
211
  class InvalidSpecError(ValueError): ...
192
212
 
193
213
  class Mailmap:
194
214
  def __init__(self, *args) -> None: ...
195
- def add_entry(self, real_name: str = ..., real_email: str = ..., replace_name: str = ..., replace_email: str = ...) -> None: ...
215
+ def add_entry(
216
+ self,
217
+ real_name: str = ...,
218
+ real_email: str = ...,
219
+ replace_name: str = ...,
220
+ replace_email: str = ...,
221
+ ) -> None: ...
196
222
  @staticmethod
197
223
  def from_buffer(buffer: str | bytes) -> Mailmap: ...
198
224
  @staticmethod
199
225
  def from_repository(repository: Repository) -> Mailmap: ...
200
- def resolve(self, name: str, email: str) -> tuple[str,str]: ...
226
+ def resolve(self, name: str, email: str) -> tuple[str, str]: ...
201
227
  def resolve_signature(self, sig: Signature) -> Signature: ...
202
228
 
203
229
  class Note:
204
230
  annotated_id: Oid
205
231
  id: Oid
206
232
  message: str
207
- def remove(self, author: Signature, committer: Signature, ref: str = "refs/notes/commits") -> None: ...
233
+ def remove(
234
+ self, author: Signature, committer: Signature, ref: str = 'refs/notes/commits'
235
+ ) -> None: ...
208
236
 
209
237
  class Odb:
210
238
  backends: Iterator[OdbBackend]
@@ -254,13 +282,13 @@ class Patch:
254
282
 
255
283
  @staticmethod
256
284
  def create_from(
257
- old: Blob | bytes | None,
258
- new: Blob | bytes | None,
259
- old_as_path: str = ...,
260
- new_as_path: str = ...,
261
- flag: DiffOption = DiffOption.NORMAL,
262
- context_lines: int = 3,
263
- interhunk_lines: int = 0
285
+ old: Blob | bytes | None,
286
+ new: Blob | bytes | None,
287
+ old_as_path: str = ...,
288
+ new_as_path: str = ...,
289
+ flag: DiffOption = DiffOption.NORMAL,
290
+ context_lines: int = 3,
291
+ interhunk_lines: int = 0,
264
292
  ) -> Patch: ...
265
293
 
266
294
  class RefLogEntry:
@@ -287,8 +315,18 @@ class RefdbBackend:
287
315
  def exists(self, refname: str) -> bool: ...
288
316
  def has_log(self, ref_name: str) -> bool: ...
289
317
  def lookup(self, refname: str) -> Reference: ...
290
- def rename(self, old_name: str, new_name: str, force: bool, who: Signature, message: str) -> Reference: ...
291
- def write(self, ref: Reference, force: bool, who: Signature, message: str, old: _OidArg, old_target: str) -> None: ...
318
+ def rename(
319
+ self, old_name: str, new_name: str, force: bool, who: Signature, message: str
320
+ ) -> Reference: ...
321
+ def write(
322
+ self,
323
+ ref: Reference,
324
+ force: bool,
325
+ who: Signature,
326
+ message: str,
327
+ old: _OidArg,
328
+ old_target: str,
329
+ ) -> None: ...
292
330
 
293
331
  class RefdbFsBackend(RefdbBackend):
294
332
  def __init__(self, *args, **kwargs) -> None: ...
@@ -311,22 +349,62 @@ class Repository:
311
349
  def _disown(self, *args, **kwargs) -> None: ...
312
350
  def _from_c(self, *args, **kwargs) -> None: ...
313
351
  def add_worktree(self, name: str, path: str, ref: Reference = ...) -> Worktree: ...
314
- def applies(self, diff: Diff, location: ApplyLocation = ApplyLocation.INDEX, raise_error: bool = False) -> bool: ...
315
- def apply(self, diff: Diff, location: ApplyLocation = ApplyLocation.WORKDIR) -> None: ...
352
+ def applies(
353
+ self,
354
+ diff: Diff,
355
+ location: ApplyLocation = ApplyLocation.INDEX,
356
+ raise_error: bool = False,
357
+ ) -> bool: ...
358
+ def apply(
359
+ self, diff: Diff, location: ApplyLocation = ApplyLocation.WORKDIR
360
+ ) -> None: ...
316
361
  def cherrypick(self, id: _OidArg) -> None: ...
317
362
  def compress_references(self) -> None: ...
318
363
  def create_blob(self, data: bytes) -> Oid: ...
319
364
  def create_blob_fromdisk(self, path: str) -> Oid: ...
320
365
  def create_blob_fromiobase(self, iobase: IOBase) -> Oid: ...
321
366
  def create_blob_fromworkdir(self, path: str) -> Oid: ...
322
- def create_branch(self, name: str, commit: Commit, force = False) -> Branch: ...
323
- def create_commit(self, reference_name: Optional[str], author: Signature, committer: Signature, message: str | bytes, tree: _OidArg, parents: list[_OidArg], encoding: str = ...) -> Oid: ...
324
- def create_commit_string(self, author: Signature, committer: Signature, message: str | bytes, tree: _OidArg, parents: list[_OidArg], encoding: str = ...) -> Oid: ...
325
- def create_commit_with_signature(self, content: str, signature: str, signature_field: Optional[str] = None) -> Oid: ...
326
- def create_note(self, message: str, author: Signature, committer: Signature, annotated_id: str, ref: str = "refs/notes/commits", force: bool = False) -> Oid: ...
327
- def create_reference_direct(self, name: str, target: _OidArg, force: bool, message: Optional[str] = None) -> Reference: ...
328
- def create_reference_symbolic(self, name: str, target: str, force: bool, message: Optional[str] = None) -> Reference: ...
329
- def create_tag(self, name: str, oid: _OidArg, type: ObjectType, tagger: Signature, message: str) -> Oid: ...
367
+ def create_branch(self, name: str, commit: Commit, force=False) -> Branch: ...
368
+ def create_commit(
369
+ self,
370
+ reference_name: Optional[str],
371
+ author: Signature,
372
+ committer: Signature,
373
+ message: str | bytes,
374
+ tree: _OidArg,
375
+ parents: list[_OidArg],
376
+ encoding: str = ...,
377
+ ) -> Oid: ...
378
+ def create_commit_string(
379
+ self,
380
+ author: Signature,
381
+ committer: Signature,
382
+ message: str | bytes,
383
+ tree: _OidArg,
384
+ parents: list[_OidArg],
385
+ encoding: str = ...,
386
+ ) -> Oid: ...
387
+ def create_commit_with_signature(
388
+ self, content: str, signature: str, signature_field: Optional[str] = None
389
+ ) -> Oid: ...
390
+ def create_note(
391
+ self,
392
+ message: str,
393
+ author: Signature,
394
+ committer: Signature,
395
+ annotated_id: str,
396
+ ref: str = 'refs/notes/commits',
397
+ force: bool = False,
398
+ ) -> Oid: ...
399
+ def create_reference_direct(
400
+ self, name: str, target: _OidArg, force: bool, message: Optional[str] = None
401
+ ) -> Reference: ...
402
+ def create_reference_symbolic(
403
+ self, name: str, target: str, force: bool, message: Optional[str] = None
404
+ ) -> Reference: ...
405
+ def create_tag(
406
+ self, name: str, oid: _OidArg, type: ObjectType, tagger: Signature, message: str
407
+ ) -> Oid: ...
330
408
  def descendant_of(self, oid1: _OidArg, oid2: _OidArg) -> bool: ...
331
409
  def expand_id(self, hex: str) -> Oid: ...
332
410
  def free(self) -> None: ...
@@ -336,30 +414,46 @@ class Repository:
336
414
  def listall_mergeheads(self) -> list[Oid]: ...
337
415
  def listall_stashes(self) -> list[Stash]: ...
338
416
  def listall_submodules(self) -> list[str]: ...
339
- def lookup_branch(self, branch_name: str, branch_type: BranchType = BranchType.LOCAL) -> Branch: ...
340
- def lookup_note(self, annotated_id: str, ref: str = "refs/notes/commits") -> Note: ...
417
+ def lookup_branch(
418
+ self, branch_name: str, branch_type: BranchType = BranchType.LOCAL
419
+ ) -> Branch: ...
420
+ def lookup_note(
421
+ self, annotated_id: str, ref: str = 'refs/notes/commits'
422
+ ) -> Note: ...
341
423
  def lookup_reference(self, name: str) -> Reference: ...
342
424
  def lookup_reference_dwim(self, name: str) -> Reference: ...
343
425
  def lookup_worktree(self, name: str) -> Worktree: ...
344
- def merge_analysis(self, their_head: _OidArg, our_ref: str = "HEAD") -> tuple[MergeAnalysis, MergePreference]: ...
426
+ def merge_analysis(
427
+ self, their_head: _OidArg, our_ref: str = 'HEAD'
428
+ ) -> tuple[MergeAnalysis, MergePreference]: ...
345
429
  def merge_base(self, oid1: _OidArg, oid2: _OidArg) -> Oid: ...
346
430
  def merge_base_many(self, oids: list[_OidArg]) -> Oid: ...
347
431
  def merge_base_octopus(self, oids: list[_OidArg]) -> Oid: ...
348
432
  def notes(self) -> Iterator[Note]: ...
349
433
  def path_is_ignored(self, path: str) -> bool: ...
350
- def raw_listall_branches(self, flag: BranchType = BranchType.LOCAL) -> list[bytes]: ...
434
+ def raw_listall_branches(
435
+ self, flag: BranchType = BranchType.LOCAL
436
+ ) -> list[bytes]: ...
351
437
  def raw_listall_references(self) -> list[bytes]: ...
352
438
  def references_iterator_init(self) -> Iterator[Reference]: ...
353
- def references_iterator_next(self, iter: Iterator, references_return_type: ReferenceFilter = ReferenceFilter.ALL) -> Reference: ...
439
+ def references_iterator_next(
440
+ self,
441
+ iter: Iterator,
442
+ references_return_type: ReferenceFilter = ReferenceFilter.ALL,
443
+ ) -> Reference: ...
354
444
  def reset(self, oid: _OidArg, reset_type: ResetMode) -> None: ...
355
445
  def revparse(self, revspec: str) -> RevSpec: ...
356
- def revparse_ext(self, revision: str) -> tuple[Object,Reference]: ...
446
+ def revparse_ext(self, revision: str) -> tuple[Object, Reference]: ...
357
447
  def revparse_single(self, revision: str) -> Object: ...
358
448
  def set_odb(self, odb: Odb) -> None: ...
359
449
  def set_refdb(self, refdb: Refdb) -> None: ...
360
- def status(self, untracked_files: str = "all", ignored: bool = False) -> dict[str,int]: ...
450
+ def status(
451
+ self, untracked_files: str = 'all', ignored: bool = False
452
+ ) -> dict[str, int]: ...
361
453
  def status_file(self, path: str) -> int: ...
362
- def walk(self, oid: _OidArg | None, sort_mode: SortMode = SortMode.NONE) -> Walker: ...
454
+ def walk(
455
+ self, oid: _OidArg | None, sort_mode: SortMode = SortMode.NONE
456
+ ) -> Walker: ...
363
457
 
364
458
  class RevSpec:
365
459
  flags: int
@@ -375,7 +469,14 @@ class Signature:
375
469
  raw_email: bytes
376
470
  raw_name: bytes
377
471
  time: int
378
- def __init__(self, name: str, email: str, time: int = -1, offset: int = 0, encoding: Optional[str] = None) -> None: ...
472
+ def __init__(
473
+ self,
474
+ name: str,
475
+ email: str,
476
+ time: int = -1,
477
+ offset: int = 0,
478
+ encoding: Optional[str] = None,
479
+ ) -> None: ...
379
480
  def __eq__(self, other) -> bool: ...
380
481
  def __ge__(self, other) -> bool: ...
381
482
  def __gt__(self, other) -> bool: ...
@@ -404,9 +505,27 @@ class Tag(Object):
404
505
  def get_object(self) -> Object: ...
405
506
 
406
507
  class Tree(Object):
407
- def diff_to_index(self, index: Index, flags: DiffOption = DiffOption.NORMAL, context_lines: int = 3, interhunk_lines: int = 0) -> Diff: ...
408
- def diff_to_tree(self, tree: Tree = ..., flags: DiffOption = DiffOption.NORMAL, context_lines: int = 3, interhunk_lines: int = 3, swap: bool = False) -> Diff: ...
409
- def diff_to_workdir(self, flags: DiffOption = DiffOption.NORMAL, context_lines: int = 3, interhunk_lines: int = 0) -> Diff: ...
508
+ def diff_to_index(
509
+ self,
510
+ index: Index,
511
+ flags: DiffOption = DiffOption.NORMAL,
512
+ context_lines: int = 3,
513
+ interhunk_lines: int = 0,
514
+ ) -> Diff: ...
515
+ def diff_to_tree(
516
+ self,
517
+ tree: Tree = ...,
518
+ flags: DiffOption = DiffOption.NORMAL,
519
+ context_lines: int = 3,
520
+ interhunk_lines: int = 3,
521
+ swap: bool = False,
522
+ ) -> Diff: ...
523
+ def diff_to_workdir(
524
+ self,
525
+ flags: DiffOption = DiffOption.NORMAL,
526
+ context_lines: int = 3,
527
+ interhunk_lines: int = 0,
528
+ ) -> Diff: ...
410
529
  def __contains__(self, other: str) -> bool: ... # Tree_contains
411
530
  def __getitem__(self, index: str | int) -> Object: ... # Tree_subscript
412
531
  def __iter__(self) -> Iterator[Object]: ...
@@ -428,16 +547,18 @@ class Walker:
428
547
  def reset(self) -> None: ...
429
548
  def simplify_first_parent(self) -> None: ...
430
549
  def sort(self, mode: SortMode) -> None: ...
431
- def __iter__(self) -> Iterator[Commit]: ... #Walker: ...
550
+ def __iter__(self) -> Iterator[Commit]: ... # Walker: ...
432
551
  def __next__(self) -> Commit: ...
433
552
 
434
553
  class Worktree:
435
554
  is_prunable: bool
436
555
  name: str
437
556
  path: str
438
- def prune(self, force = False) -> None: ...
557
+ def prune(self, force=False) -> None: ...
439
558
 
440
- def discover_repository(path: str, across_fs: bool = False, ceiling_dirs: str = ...) -> str: ...
559
+ def discover_repository(
560
+ path: str, across_fs: bool = False, ceiling_dirs: str = ...
561
+ ) -> str: ...
441
562
  def hash(data: bytes) -> Oid: ...
442
563
  def hashfile(path: str) -> Oid: ...
443
564
  def init_file_backend(path: str, flags: int = 0) -> object: ...