pygit2 1.21.0__cp315-cp315-win_amd64.whl
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/__init__.py +965 -0
- pygit2/_build.py +82 -0
- pygit2/_libgit2.pyd +0 -0
- pygit2/_pygit2.cp315-win_amd64.pyd +0 -0
- pygit2/_pygit2.pyi +887 -0
- pygit2/_run.py +110 -0
- pygit2/blame.py +160 -0
- pygit2/blob.py +165 -0
- pygit2/branches.py +111 -0
- pygit2/callbacks.py +943 -0
- pygit2/config.py +1023 -0
- pygit2/credentials.py +144 -0
- pygit2/decl/attr.h +31 -0
- pygit2/decl/blame.h +52 -0
- pygit2/decl/buffer.h +7 -0
- pygit2/decl/callbacks.h +78 -0
- pygit2/decl/checkout.h +87 -0
- pygit2/decl/clone.h +44 -0
- pygit2/decl/commit.h +21 -0
- pygit2/decl/common.h +10 -0
- pygit2/decl/config.h +55 -0
- pygit2/decl/describe.h +48 -0
- pygit2/decl/diff.h +91 -0
- pygit2/decl/errors.h +90 -0
- pygit2/decl/filter.h +49 -0
- pygit2/decl/graph.h +1 -0
- pygit2/decl/index.h +80 -0
- pygit2/decl/indexer.h +11 -0
- pygit2/decl/merge.h +96 -0
- pygit2/decl/net.h +5 -0
- pygit2/decl/oid.h +16 -0
- pygit2/decl/options.h +50 -0
- pygit2/decl/pack.h +18 -0
- pygit2/decl/proxy.h +18 -0
- pygit2/decl/rebase.h +80 -0
- pygit2/decl/refspec.h +9 -0
- pygit2/decl/remote.h +152 -0
- pygit2/decl/repository.h +94 -0
- pygit2/decl/revert.h +21 -0
- pygit2/decl/stash.h +90 -0
- pygit2/decl/strarray.h +6 -0
- pygit2/decl/submodule.h +45 -0
- pygit2/decl/transaction.h +8 -0
- pygit2/decl/transport.h +61 -0
- pygit2/decl/types.h +74 -0
- pygit2/enums.py +1335 -0
- pygit2/errors.py +125 -0
- pygit2/ffi.py +30 -0
- pygit2/filter.py +207 -0
- pygit2/git2.dll +0 -0
- pygit2/index.py +567 -0
- pygit2/options.py +800 -0
- pygit2/packbuilder.py +87 -0
- pygit2/py.typed +1 -0
- pygit2/rebase.py +249 -0
- pygit2/references.py +115 -0
- pygit2/refspec.py +97 -0
- pygit2/remotes.py +514 -0
- pygit2/repository.py +2054 -0
- pygit2/settings.py +348 -0
- pygit2/submodules.py +395 -0
- pygit2/transaction.py +199 -0
- pygit2/utils.py +263 -0
- pygit2-1.21.0.dist-info/METADATA +94 -0
- pygit2-1.21.0.dist-info/RECORD +69 -0
- pygit2-1.21.0.dist-info/WHEEL +5 -0
- pygit2-1.21.0.dist-info/licenses/AUTHORS.md +257 -0
- pygit2-1.21.0.dist-info/licenses/COPYING +360 -0
- pygit2-1.21.0.dist-info/top_level.txt +1 -0
pygit2/__init__.py
ADDED
|
@@ -0,0 +1,965 @@
|
|
|
1
|
+
# Copyright 2010-2026 The pygit2 contributors
|
|
2
|
+
#
|
|
3
|
+
# This file is free software; you can redistribute it and/or modify
|
|
4
|
+
# it under the terms of the GNU General Public License, version 2,
|
|
5
|
+
# as published by the Free Software Foundation.
|
|
6
|
+
#
|
|
7
|
+
# In addition to the permissions in the GNU General Public License,
|
|
8
|
+
# the authors give you unlimited permission to link the compiled
|
|
9
|
+
# version of this file into combinations with other programs,
|
|
10
|
+
# and to distribute those combinations without any restriction
|
|
11
|
+
# coming from the use of this file. (The General Public License
|
|
12
|
+
# restrictions do apply in other respects; for example, they cover
|
|
13
|
+
# modification of the file, and distribution when not linked into
|
|
14
|
+
# a combined executable.)
|
|
15
|
+
#
|
|
16
|
+
# This file is distributed in the hope that it will be useful, but
|
|
17
|
+
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
18
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
19
|
+
# General Public License for more details.
|
|
20
|
+
#
|
|
21
|
+
# You should have received a copy of the GNU General Public License
|
|
22
|
+
# along with this program; see the file COPYING. If not, write to
|
|
23
|
+
# the Free Software Foundation, 51 Franklin Street, Fifth Floor,
|
|
24
|
+
# Boston, MA 02110-1301, USA.
|
|
25
|
+
|
|
26
|
+
# ruff: noqa: F401 F403 F405
|
|
27
|
+
|
|
28
|
+
# Standard Library
|
|
29
|
+
import functools
|
|
30
|
+
import os
|
|
31
|
+
import typing
|
|
32
|
+
|
|
33
|
+
# High level API
|
|
34
|
+
from . import enums, utils
|
|
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
|
+
Blob,
|
|
252
|
+
Branch,
|
|
253
|
+
Commit,
|
|
254
|
+
Diff,
|
|
255
|
+
DiffDelta,
|
|
256
|
+
DiffFile,
|
|
257
|
+
DiffHunk,
|
|
258
|
+
DiffLine,
|
|
259
|
+
DiffStats,
|
|
260
|
+
FilterSource,
|
|
261
|
+
Mailmap,
|
|
262
|
+
Note,
|
|
263
|
+
Object,
|
|
264
|
+
Odb,
|
|
265
|
+
OdbBackend,
|
|
266
|
+
OdbBackendLoose,
|
|
267
|
+
OdbBackendPack,
|
|
268
|
+
Oid,
|
|
269
|
+
Patch,
|
|
270
|
+
Refdb,
|
|
271
|
+
RefdbBackend,
|
|
272
|
+
RefdbFsBackend,
|
|
273
|
+
Reference,
|
|
274
|
+
RefLogEntry,
|
|
275
|
+
RevSpec,
|
|
276
|
+
Signature,
|
|
277
|
+
Stash,
|
|
278
|
+
Tag,
|
|
279
|
+
Tree,
|
|
280
|
+
TreeBuilder,
|
|
281
|
+
Walker,
|
|
282
|
+
Worktree,
|
|
283
|
+
_cache_enums,
|
|
284
|
+
discover_repository,
|
|
285
|
+
filter_register,
|
|
286
|
+
hash,
|
|
287
|
+
hashfile,
|
|
288
|
+
init_file_backend,
|
|
289
|
+
reference_is_valid_name,
|
|
290
|
+
tree_entry_cmp,
|
|
291
|
+
)
|
|
292
|
+
from .blame import Blame, BlameHunk
|
|
293
|
+
from .blob import BlobIO
|
|
294
|
+
from .callbacks import (
|
|
295
|
+
CheckoutCallbacks,
|
|
296
|
+
Payload,
|
|
297
|
+
RemoteCallbacks,
|
|
298
|
+
StashApplyCallbacks,
|
|
299
|
+
get_credentials,
|
|
300
|
+
git_clone_options,
|
|
301
|
+
git_fetch_options,
|
|
302
|
+
git_proxy_options,
|
|
303
|
+
)
|
|
304
|
+
from .config import (
|
|
305
|
+
Config,
|
|
306
|
+
DefaultConfig,
|
|
307
|
+
RepositoryConfig,
|
|
308
|
+
)
|
|
309
|
+
from .credentials import *
|
|
310
|
+
from .errors import (
|
|
311
|
+
AlreadyExistsError,
|
|
312
|
+
AmbiguousError,
|
|
313
|
+
AuthError,
|
|
314
|
+
CertificateError,
|
|
315
|
+
GitError,
|
|
316
|
+
InvalidError,
|
|
317
|
+
InvalidSpecError,
|
|
318
|
+
NotFoundError,
|
|
319
|
+
Passthrough,
|
|
320
|
+
check_error,
|
|
321
|
+
)
|
|
322
|
+
from .ffi import C, ffi
|
|
323
|
+
from .filter import Filter
|
|
324
|
+
from .index import Index, IndexEntry
|
|
325
|
+
from .options import (
|
|
326
|
+
GIT_OPT_ADD_SSL_X509_CERT,
|
|
327
|
+
GIT_OPT_DISABLE_PACK_KEEP_FILE_CHECKS,
|
|
328
|
+
GIT_OPT_ENABLE_CACHING,
|
|
329
|
+
GIT_OPT_ENABLE_FSYNC_GITDIR,
|
|
330
|
+
GIT_OPT_ENABLE_HTTP_EXPECT_CONTINUE,
|
|
331
|
+
GIT_OPT_ENABLE_OFS_DELTA,
|
|
332
|
+
GIT_OPT_ENABLE_STRICT_HASH_VERIFICATION,
|
|
333
|
+
GIT_OPT_ENABLE_STRICT_OBJECT_CREATION,
|
|
334
|
+
GIT_OPT_ENABLE_STRICT_SYMBOLIC_REF_CREATION,
|
|
335
|
+
GIT_OPT_ENABLE_UNSAVED_INDEX_SAFETY,
|
|
336
|
+
GIT_OPT_GET_CACHED_MEMORY,
|
|
337
|
+
GIT_OPT_GET_EXTENSIONS,
|
|
338
|
+
GIT_OPT_GET_HOMEDIR,
|
|
339
|
+
GIT_OPT_GET_MWINDOW_FILE_LIMIT,
|
|
340
|
+
GIT_OPT_GET_MWINDOW_MAPPED_LIMIT,
|
|
341
|
+
GIT_OPT_GET_MWINDOW_SIZE,
|
|
342
|
+
GIT_OPT_GET_OWNER_VALIDATION,
|
|
343
|
+
GIT_OPT_GET_PACK_MAX_OBJECTS,
|
|
344
|
+
GIT_OPT_GET_SEARCH_PATH,
|
|
345
|
+
GIT_OPT_GET_SERVER_CONNECT_TIMEOUT,
|
|
346
|
+
GIT_OPT_GET_SERVER_TIMEOUT,
|
|
347
|
+
GIT_OPT_GET_TEMPLATE_PATH,
|
|
348
|
+
GIT_OPT_GET_USER_AGENT,
|
|
349
|
+
GIT_OPT_GET_USER_AGENT_PRODUCT,
|
|
350
|
+
GIT_OPT_GET_WINDOWS_SHAREMODE,
|
|
351
|
+
GIT_OPT_SET_ALLOCATOR,
|
|
352
|
+
GIT_OPT_SET_CACHE_MAX_SIZE,
|
|
353
|
+
GIT_OPT_SET_CACHE_OBJECT_LIMIT,
|
|
354
|
+
GIT_OPT_SET_EXTENSIONS,
|
|
355
|
+
GIT_OPT_SET_HOMEDIR,
|
|
356
|
+
GIT_OPT_SET_MWINDOW_FILE_LIMIT,
|
|
357
|
+
GIT_OPT_SET_MWINDOW_MAPPED_LIMIT,
|
|
358
|
+
GIT_OPT_SET_MWINDOW_SIZE,
|
|
359
|
+
GIT_OPT_SET_ODB_LOOSE_PRIORITY,
|
|
360
|
+
GIT_OPT_SET_ODB_PACKED_PRIORITY,
|
|
361
|
+
GIT_OPT_SET_OWNER_VALIDATION,
|
|
362
|
+
GIT_OPT_SET_PACK_MAX_OBJECTS,
|
|
363
|
+
GIT_OPT_SET_SEARCH_PATH,
|
|
364
|
+
GIT_OPT_SET_SERVER_CONNECT_TIMEOUT,
|
|
365
|
+
GIT_OPT_SET_SERVER_TIMEOUT,
|
|
366
|
+
GIT_OPT_SET_SSL_CERT_LOCATIONS,
|
|
367
|
+
GIT_OPT_SET_SSL_CIPHERS,
|
|
368
|
+
GIT_OPT_SET_TEMPLATE_PATH,
|
|
369
|
+
GIT_OPT_SET_USER_AGENT,
|
|
370
|
+
GIT_OPT_SET_USER_AGENT_PRODUCT,
|
|
371
|
+
GIT_OPT_SET_WINDOWS_SHAREMODE,
|
|
372
|
+
option,
|
|
373
|
+
)
|
|
374
|
+
from .packbuilder import PackBuilder
|
|
375
|
+
from .rebase import Rebase, RebaseOperation
|
|
376
|
+
from .remotes import Remote
|
|
377
|
+
from .repository import Repository
|
|
378
|
+
from .settings import Settings
|
|
379
|
+
from .submodules import Submodule
|
|
380
|
+
from .transaction import ReferenceTransaction
|
|
381
|
+
|
|
382
|
+
# Features
|
|
383
|
+
features = enums.Feature(C.git_libgit2_features())
|
|
384
|
+
|
|
385
|
+
# libgit version tuple
|
|
386
|
+
LIBGIT2_VER = (LIBGIT2_VER_MAJOR, LIBGIT2_VER_MINOR, LIBGIT2_VER_REVISION)
|
|
387
|
+
|
|
388
|
+
# Let _pygit2 cache references to Python enum types.
|
|
389
|
+
# This is separate from PyInit__pygit2() to avoid a circular import.
|
|
390
|
+
_cache_enums()
|
|
391
|
+
|
|
392
|
+
|
|
393
|
+
def init_repository(
|
|
394
|
+
path: str | bytes | os.PathLike[str] | os.PathLike[bytes] | None,
|
|
395
|
+
bare: bool = False,
|
|
396
|
+
flags: enums.RepositoryInitFlag = enums.RepositoryInitFlag.MKPATH,
|
|
397
|
+
mode: int | enums.RepositoryInitMode = enums.RepositoryInitMode.SHARED_UMASK,
|
|
398
|
+
workdir_path: typing.Optional[str] = None,
|
|
399
|
+
description: typing.Optional[str] = None,
|
|
400
|
+
template_path: typing.Optional[str] = None,
|
|
401
|
+
initial_head: typing.Optional[str] = None,
|
|
402
|
+
origin_url: typing.Optional[str] = None,
|
|
403
|
+
) -> Repository:
|
|
404
|
+
"""
|
|
405
|
+
Creates a new Git repository in the given *path*.
|
|
406
|
+
|
|
407
|
+
If *bare* is True the repository will be bare, i.e. it will not have a
|
|
408
|
+
working copy.
|
|
409
|
+
|
|
410
|
+
The *flags* may be a combination of enums.RepositoryInitFlag constants:
|
|
411
|
+
|
|
412
|
+
- BARE (overridden by the *bare* parameter)
|
|
413
|
+
- NO_REINIT
|
|
414
|
+
- NO_DOTGIT_DIR
|
|
415
|
+
- MKDIR
|
|
416
|
+
- MKPATH (set by default)
|
|
417
|
+
- EXTERNAL_TEMPLATE
|
|
418
|
+
|
|
419
|
+
The *mode* parameter may be any of the predefined modes in
|
|
420
|
+
enums.RepositoryInitMode (SHARED_UMASK being the default), or a custom int.
|
|
421
|
+
|
|
422
|
+
The *workdir_path*, *description*, *template_path*, *initial_head* and
|
|
423
|
+
*origin_url* are all strings.
|
|
424
|
+
|
|
425
|
+
If a repository already exists at *path*, it may be opened successfully but
|
|
426
|
+
you must not rely on that behavior and should use the Repository
|
|
427
|
+
constructor directly instead.
|
|
428
|
+
|
|
429
|
+
See libgit2's documentation on git_repository_init_ext for further details.
|
|
430
|
+
"""
|
|
431
|
+
# Pre-process input parameters
|
|
432
|
+
if path is None:
|
|
433
|
+
raise TypeError('Expected string type for path, found None.')
|
|
434
|
+
|
|
435
|
+
if bare:
|
|
436
|
+
flags |= enums.RepositoryInitFlag.BARE
|
|
437
|
+
|
|
438
|
+
# Options
|
|
439
|
+
options = ffi.new('git_repository_init_options *')
|
|
440
|
+
C.git_repository_init_options_init(options, C.GIT_REPOSITORY_INIT_OPTIONS_VERSION)
|
|
441
|
+
options.flags = int(flags)
|
|
442
|
+
options.mode = mode
|
|
443
|
+
|
|
444
|
+
if workdir_path:
|
|
445
|
+
workdir_path_ref = ffi.new('char []', utils.encode_fs_path(workdir_path))
|
|
446
|
+
options.workdir_path = workdir_path_ref
|
|
447
|
+
|
|
448
|
+
if description:
|
|
449
|
+
description_ref = ffi.new('char []', utils.encode_string(description))
|
|
450
|
+
options.description = description_ref
|
|
451
|
+
|
|
452
|
+
if template_path:
|
|
453
|
+
template_path_ref = ffi.new('char []', utils.encode_fs_path(template_path))
|
|
454
|
+
options.template_path = template_path_ref
|
|
455
|
+
|
|
456
|
+
if initial_head:
|
|
457
|
+
initial_head_ref = ffi.new('char []', utils.encode_string(initial_head))
|
|
458
|
+
options.initial_head = initial_head_ref
|
|
459
|
+
|
|
460
|
+
if origin_url:
|
|
461
|
+
origin_url_ref = ffi.new('char []', utils.encode_string(origin_url))
|
|
462
|
+
options.origin_url = origin_url_ref
|
|
463
|
+
|
|
464
|
+
# Call
|
|
465
|
+
crepository = ffi.new('git_repository **')
|
|
466
|
+
err = C.git_repository_init_ext(crepository, utils.encode_fs_path(path), options)
|
|
467
|
+
check_error(err)
|
|
468
|
+
|
|
469
|
+
# Ok
|
|
470
|
+
return Repository(utils.path_to_str(path))
|
|
471
|
+
|
|
472
|
+
|
|
473
|
+
def clone_repository(
|
|
474
|
+
url: str | bytes | os.PathLike[str] | os.PathLike[bytes],
|
|
475
|
+
path: str | bytes | os.PathLike[str] | os.PathLike[bytes],
|
|
476
|
+
bare: bool = False,
|
|
477
|
+
repository: typing.Callable | None = None,
|
|
478
|
+
remote: typing.Callable | None = None,
|
|
479
|
+
checkout_branch: str | bytes | None = None,
|
|
480
|
+
callbacks: RemoteCallbacks | None = None,
|
|
481
|
+
depth: int = 0,
|
|
482
|
+
proxy: None | bool | str = None,
|
|
483
|
+
) -> Repository:
|
|
484
|
+
"""
|
|
485
|
+
Clones a new Git repository from *url* in the given *path*.
|
|
486
|
+
|
|
487
|
+
Returns: a Repository class pointing to the newly cloned repository.
|
|
488
|
+
|
|
489
|
+
Parameters:
|
|
490
|
+
|
|
491
|
+
url : str or bytes or pathlike object
|
|
492
|
+
URL of the repository to clone.
|
|
493
|
+
path : str or bytes or pathlike object
|
|
494
|
+
Local path to clone into.
|
|
495
|
+
bare : bool
|
|
496
|
+
Whether the local repository should be bare.
|
|
497
|
+
remote : callable
|
|
498
|
+
Callback for the remote to use.
|
|
499
|
+
|
|
500
|
+
The remote callback has `(Repository, name, url) -> Remote` as a
|
|
501
|
+
signature. The Remote it returns will be used instead of the default
|
|
502
|
+
one.
|
|
503
|
+
repository : callable
|
|
504
|
+
Callback for the repository to use.
|
|
505
|
+
|
|
506
|
+
The repository callback has `(path, bare) -> Repository` as a
|
|
507
|
+
signature. The Repository it returns will be used instead of creating a
|
|
508
|
+
new one.
|
|
509
|
+
checkout_branch : str or bytes
|
|
510
|
+
Branch to checkout after the clone. The default is to use the remote's
|
|
511
|
+
default branch.
|
|
512
|
+
callbacks : RemoteCallbacks
|
|
513
|
+
Object which implements the callbacks as methods.
|
|
514
|
+
|
|
515
|
+
The callbacks should be an object which inherits from
|
|
516
|
+
`pyclass:RemoteCallbacks`.
|
|
517
|
+
depth : int
|
|
518
|
+
Number of commits to clone.
|
|
519
|
+
|
|
520
|
+
If greater than 0, creates a shallow clone with a history truncated to
|
|
521
|
+
the specified number of commits.
|
|
522
|
+
The default is 0 (full commit history).
|
|
523
|
+
proxy : None or True or str
|
|
524
|
+
Proxy configuration. Can be one of:
|
|
525
|
+
|
|
526
|
+
* `None` (the default) to disable proxy usage
|
|
527
|
+
* `True` to enable automatic proxy detection
|
|
528
|
+
* an url to a proxy (`http://proxy.example.org:3128/`)
|
|
529
|
+
"""
|
|
530
|
+
|
|
531
|
+
if callbacks is None:
|
|
532
|
+
callbacks = RemoteCallbacks()
|
|
533
|
+
|
|
534
|
+
# Add repository and remote to the payload
|
|
535
|
+
payload = callbacks
|
|
536
|
+
payload.repository = repository
|
|
537
|
+
payload.remote = remote
|
|
538
|
+
|
|
539
|
+
with git_clone_options(payload):
|
|
540
|
+
opts = payload.clone_options
|
|
541
|
+
opts.bare = bare
|
|
542
|
+
opts.fetch_opts.depth = depth
|
|
543
|
+
|
|
544
|
+
if checkout_branch:
|
|
545
|
+
checkout_branch_ref = ffi.new(
|
|
546
|
+
'char []', utils.encode_string(checkout_branch)
|
|
547
|
+
)
|
|
548
|
+
opts.checkout_branch = checkout_branch_ref
|
|
549
|
+
|
|
550
|
+
with git_fetch_options(payload, opts=opts.fetch_opts):
|
|
551
|
+
with git_proxy_options(payload, opts.fetch_opts.proxy_opts, proxy):
|
|
552
|
+
crepo = ffi.new('git_repository **')
|
|
553
|
+
err = C.git_clone(
|
|
554
|
+
crepo, utils.encode_string(url), utils.encode_fs_path(path), opts
|
|
555
|
+
)
|
|
556
|
+
payload.check_error(err)
|
|
557
|
+
|
|
558
|
+
# Ok
|
|
559
|
+
return Repository._from_c(crepo[0], owned=True)
|
|
560
|
+
|
|
561
|
+
|
|
562
|
+
def filter_unregister(name: str) -> None:
|
|
563
|
+
"""
|
|
564
|
+
Unregister the given filter.
|
|
565
|
+
|
|
566
|
+
Note that the filter registry is not thread safe. Any registering or
|
|
567
|
+
deregistering of filters should be done outside of any possible usage
|
|
568
|
+
of the filters.
|
|
569
|
+
|
|
570
|
+
In particular, any FilterLists that use the filter must have been garbage
|
|
571
|
+
collected before you can unregister the filter.
|
|
572
|
+
"""
|
|
573
|
+
from .filter import FilterList
|
|
574
|
+
|
|
575
|
+
if FilterList._is_filter_in_use(name):
|
|
576
|
+
raise RuntimeError(f"filter still in use: '{name}'")
|
|
577
|
+
|
|
578
|
+
c_name = utils.encode_string(name)
|
|
579
|
+
err = C.git_filter_unregister(c_name)
|
|
580
|
+
check_error(err)
|
|
581
|
+
|
|
582
|
+
|
|
583
|
+
tree_entry_key = functools.cmp_to_key(tree_entry_cmp)
|
|
584
|
+
|
|
585
|
+
settings = Settings()
|
|
586
|
+
|
|
587
|
+
__all__ = (
|
|
588
|
+
# Standard Library
|
|
589
|
+
'functools',
|
|
590
|
+
'os',
|
|
591
|
+
'typing',
|
|
592
|
+
# Standard Library symbols
|
|
593
|
+
'TYPE_CHECKING',
|
|
594
|
+
'annotations',
|
|
595
|
+
# Low level API
|
|
596
|
+
'GIT_OID_HEX_ZERO',
|
|
597
|
+
'GIT_OID_HEXSZ',
|
|
598
|
+
'GIT_OID_MINPREFIXLEN',
|
|
599
|
+
'GIT_OID_RAWSZ',
|
|
600
|
+
'LIBGIT2_VER_MAJOR',
|
|
601
|
+
'LIBGIT2_VER_MINOR',
|
|
602
|
+
'LIBGIT2_VER_REVISION',
|
|
603
|
+
'LIBGIT2_VERSION',
|
|
604
|
+
'Object',
|
|
605
|
+
'Reference',
|
|
606
|
+
'AlreadyExistsError',
|
|
607
|
+
'AmbiguousError',
|
|
608
|
+
'AuthError',
|
|
609
|
+
'Blob',
|
|
610
|
+
'Branch',
|
|
611
|
+
'CertificateError',
|
|
612
|
+
'Commit',
|
|
613
|
+
'DefaultConfig',
|
|
614
|
+
'Diff',
|
|
615
|
+
'DiffDelta',
|
|
616
|
+
'DiffFile',
|
|
617
|
+
'DiffHunk',
|
|
618
|
+
'DiffLine',
|
|
619
|
+
'DiffStats',
|
|
620
|
+
'GitError',
|
|
621
|
+
'InvalidError',
|
|
622
|
+
'InvalidSpecError',
|
|
623
|
+
'Mailmap',
|
|
624
|
+
'Note',
|
|
625
|
+
'NotFoundError',
|
|
626
|
+
'Odb',
|
|
627
|
+
'OdbBackend',
|
|
628
|
+
'OdbBackendLoose',
|
|
629
|
+
'OdbBackendPack',
|
|
630
|
+
'Oid',
|
|
631
|
+
'Patch',
|
|
632
|
+
'RefLogEntry',
|
|
633
|
+
'Refdb',
|
|
634
|
+
'RefdbBackend',
|
|
635
|
+
'RefdbFsBackend',
|
|
636
|
+
'RevSpec',
|
|
637
|
+
'Signature',
|
|
638
|
+
'Stash',
|
|
639
|
+
'Tag',
|
|
640
|
+
'Tree',
|
|
641
|
+
'TreeBuilder',
|
|
642
|
+
'Walker',
|
|
643
|
+
'Worktree',
|
|
644
|
+
'discover_repository',
|
|
645
|
+
'hash',
|
|
646
|
+
'hashfile',
|
|
647
|
+
'init_file_backend',
|
|
648
|
+
'option',
|
|
649
|
+
'reference_is_valid_name',
|
|
650
|
+
'tree_entry_cmp',
|
|
651
|
+
# Low Level API (not present in .pyi)
|
|
652
|
+
'FilterSource',
|
|
653
|
+
'filter_register',
|
|
654
|
+
'GIT_APPLY_LOCATION_BOTH',
|
|
655
|
+
'GIT_APPLY_LOCATION_INDEX',
|
|
656
|
+
'GIT_APPLY_LOCATION_WORKDIR',
|
|
657
|
+
'GIT_BLAME_FIRST_PARENT',
|
|
658
|
+
'GIT_BLAME_IGNORE_WHITESPACE',
|
|
659
|
+
'GIT_BLAME_NORMAL',
|
|
660
|
+
'GIT_BLAME_TRACK_COPIES_ANY_COMMIT_COPIES',
|
|
661
|
+
'GIT_BLAME_TRACK_COPIES_SAME_COMMIT_COPIES',
|
|
662
|
+
'GIT_BLAME_TRACK_COPIES_SAME_COMMIT_MOVES',
|
|
663
|
+
'GIT_BLAME_TRACK_COPIES_SAME_FILE',
|
|
664
|
+
'GIT_BLAME_USE_MAILMAP',
|
|
665
|
+
'GIT_BLOB_FILTER_ATTRIBUTES_FROM_COMMIT',
|
|
666
|
+
'GIT_BLOB_FILTER_ATTRIBUTES_FROM_HEAD',
|
|
667
|
+
'GIT_BLOB_FILTER_CHECK_FOR_BINARY',
|
|
668
|
+
'GIT_BLOB_FILTER_NO_SYSTEM_ATTRIBUTES',
|
|
669
|
+
'GIT_BRANCH_ALL',
|
|
670
|
+
'GIT_BRANCH_LOCAL',
|
|
671
|
+
'GIT_BRANCH_REMOTE',
|
|
672
|
+
'GIT_CHECKOUT_ALLOW_CONFLICTS',
|
|
673
|
+
'GIT_CHECKOUT_CONFLICT_STYLE_DIFF3',
|
|
674
|
+
'GIT_CHECKOUT_CONFLICT_STYLE_MERGE',
|
|
675
|
+
'GIT_CHECKOUT_CONFLICT_STYLE_ZDIFF3',
|
|
676
|
+
'GIT_CHECKOUT_DISABLE_PATHSPEC_MATCH',
|
|
677
|
+
'GIT_CHECKOUT_DONT_OVERWRITE_IGNORED',
|
|
678
|
+
'GIT_CHECKOUT_DONT_REMOVE_EXISTING',
|
|
679
|
+
'GIT_CHECKOUT_DONT_UPDATE_INDEX',
|
|
680
|
+
'GIT_CHECKOUT_DONT_WRITE_INDEX',
|
|
681
|
+
'GIT_CHECKOUT_DRY_RUN',
|
|
682
|
+
'GIT_CHECKOUT_FORCE',
|
|
683
|
+
'GIT_CHECKOUT_NO_REFRESH',
|
|
684
|
+
'GIT_CHECKOUT_NONE',
|
|
685
|
+
'GIT_CHECKOUT_RECREATE_MISSING',
|
|
686
|
+
'GIT_CHECKOUT_REMOVE_IGNORED',
|
|
687
|
+
'GIT_CHECKOUT_REMOVE_UNTRACKED',
|
|
688
|
+
'GIT_CHECKOUT_SAFE',
|
|
689
|
+
'GIT_CHECKOUT_SKIP_LOCKED_DIRECTORIES',
|
|
690
|
+
'GIT_CHECKOUT_SKIP_UNMERGED',
|
|
691
|
+
'GIT_CHECKOUT_UPDATE_ONLY',
|
|
692
|
+
'GIT_CHECKOUT_USE_OURS',
|
|
693
|
+
'GIT_CHECKOUT_USE_THEIRS',
|
|
694
|
+
'GIT_CONFIG_HIGHEST_LEVEL',
|
|
695
|
+
'GIT_CONFIG_LEVEL_APP',
|
|
696
|
+
'GIT_CONFIG_LEVEL_GLOBAL',
|
|
697
|
+
'GIT_CONFIG_LEVEL_LOCAL',
|
|
698
|
+
'GIT_CONFIG_LEVEL_PROGRAMDATA',
|
|
699
|
+
'GIT_CONFIG_LEVEL_SYSTEM',
|
|
700
|
+
'GIT_CONFIG_LEVEL_WORKTREE',
|
|
701
|
+
'GIT_CONFIG_LEVEL_XDG',
|
|
702
|
+
'GIT_DELTA_ADDED',
|
|
703
|
+
'GIT_DELTA_CONFLICTED',
|
|
704
|
+
'GIT_DELTA_COPIED',
|
|
705
|
+
'GIT_DELTA_DELETED',
|
|
706
|
+
'GIT_DELTA_IGNORED',
|
|
707
|
+
'GIT_DELTA_MODIFIED',
|
|
708
|
+
'GIT_DELTA_RENAMED',
|
|
709
|
+
'GIT_DELTA_TYPECHANGE',
|
|
710
|
+
'GIT_DELTA_UNMODIFIED',
|
|
711
|
+
'GIT_DELTA_UNREADABLE',
|
|
712
|
+
'GIT_DELTA_UNTRACKED',
|
|
713
|
+
'GIT_DESCRIBE_ALL',
|
|
714
|
+
'GIT_DESCRIBE_DEFAULT',
|
|
715
|
+
'GIT_DESCRIBE_TAGS',
|
|
716
|
+
'GIT_DIFF_BREAK_REWRITES_FOR_RENAMES_ONLY',
|
|
717
|
+
'GIT_DIFF_BREAK_REWRITES',
|
|
718
|
+
'GIT_DIFF_DISABLE_PATHSPEC_MATCH',
|
|
719
|
+
'GIT_DIFF_ENABLE_FAST_UNTRACKED_DIRS',
|
|
720
|
+
'GIT_DIFF_FIND_ALL',
|
|
721
|
+
'GIT_DIFF_FIND_AND_BREAK_REWRITES',
|
|
722
|
+
'GIT_DIFF_FIND_BY_CONFIG',
|
|
723
|
+
'GIT_DIFF_FIND_COPIES_FROM_UNMODIFIED',
|
|
724
|
+
'GIT_DIFF_FIND_COPIES',
|
|
725
|
+
'GIT_DIFF_FIND_DONT_IGNORE_WHITESPACE',
|
|
726
|
+
'GIT_DIFF_FIND_EXACT_MATCH_ONLY',
|
|
727
|
+
'GIT_DIFF_FIND_FOR_UNTRACKED',
|
|
728
|
+
'GIT_DIFF_FIND_IGNORE_LEADING_WHITESPACE',
|
|
729
|
+
'GIT_DIFF_FIND_IGNORE_WHITESPACE',
|
|
730
|
+
'GIT_DIFF_FIND_REMOVE_UNMODIFIED',
|
|
731
|
+
'GIT_DIFF_FIND_RENAMES_FROM_REWRITES',
|
|
732
|
+
'GIT_DIFF_FIND_RENAMES',
|
|
733
|
+
'GIT_DIFF_FIND_REWRITES',
|
|
734
|
+
'GIT_DIFF_FLAG_BINARY',
|
|
735
|
+
'GIT_DIFF_FLAG_EXISTS',
|
|
736
|
+
'GIT_DIFF_FLAG_NOT_BINARY',
|
|
737
|
+
'GIT_DIFF_FLAG_VALID_ID',
|
|
738
|
+
'GIT_DIFF_FLAG_VALID_SIZE',
|
|
739
|
+
'GIT_DIFF_FORCE_BINARY',
|
|
740
|
+
'GIT_DIFF_FORCE_TEXT',
|
|
741
|
+
'GIT_DIFF_IGNORE_BLANK_LINES',
|
|
742
|
+
'GIT_DIFF_IGNORE_CASE',
|
|
743
|
+
'GIT_DIFF_IGNORE_FILEMODE',
|
|
744
|
+
'GIT_DIFF_IGNORE_SUBMODULES',
|
|
745
|
+
'GIT_DIFF_IGNORE_WHITESPACE_CHANGE',
|
|
746
|
+
'GIT_DIFF_IGNORE_WHITESPACE_EOL',
|
|
747
|
+
'GIT_DIFF_IGNORE_WHITESPACE',
|
|
748
|
+
'GIT_DIFF_INCLUDE_CASECHANGE',
|
|
749
|
+
'GIT_DIFF_INCLUDE_IGNORED',
|
|
750
|
+
'GIT_DIFF_INCLUDE_TYPECHANGE_TREES',
|
|
751
|
+
'GIT_DIFF_INCLUDE_TYPECHANGE',
|
|
752
|
+
'GIT_DIFF_INCLUDE_UNMODIFIED',
|
|
753
|
+
'GIT_DIFF_INCLUDE_UNREADABLE_AS_UNTRACKED',
|
|
754
|
+
'GIT_DIFF_INCLUDE_UNREADABLE',
|
|
755
|
+
'GIT_DIFF_INCLUDE_UNTRACKED',
|
|
756
|
+
'GIT_DIFF_INDENT_HEURISTIC',
|
|
757
|
+
'GIT_DIFF_MINIMAL',
|
|
758
|
+
'GIT_DIFF_NORMAL',
|
|
759
|
+
'GIT_DIFF_PATIENCE',
|
|
760
|
+
'GIT_DIFF_RECURSE_IGNORED_DIRS',
|
|
761
|
+
'GIT_DIFF_RECURSE_UNTRACKED_DIRS',
|
|
762
|
+
'GIT_DIFF_REVERSE',
|
|
763
|
+
'GIT_DIFF_SHOW_BINARY',
|
|
764
|
+
'GIT_DIFF_SHOW_UNMODIFIED',
|
|
765
|
+
'GIT_DIFF_SHOW_UNTRACKED_CONTENT',
|
|
766
|
+
'GIT_DIFF_SKIP_BINARY_CHECK',
|
|
767
|
+
'GIT_DIFF_STATS_FULL',
|
|
768
|
+
'GIT_DIFF_STATS_INCLUDE_SUMMARY',
|
|
769
|
+
'GIT_DIFF_STATS_NONE',
|
|
770
|
+
'GIT_DIFF_STATS_NUMBER',
|
|
771
|
+
'GIT_DIFF_STATS_SHORT',
|
|
772
|
+
'GIT_DIFF_UPDATE_INDEX',
|
|
773
|
+
'GIT_FILEMODE_BLOB_EXECUTABLE',
|
|
774
|
+
'GIT_FILEMODE_BLOB',
|
|
775
|
+
'GIT_FILEMODE_COMMIT',
|
|
776
|
+
'GIT_FILEMODE_LINK',
|
|
777
|
+
'GIT_FILEMODE_TREE',
|
|
778
|
+
'GIT_FILEMODE_UNREADABLE',
|
|
779
|
+
'GIT_FILTER_ALLOW_UNSAFE',
|
|
780
|
+
'GIT_FILTER_ATTRIBUTES_FROM_COMMIT',
|
|
781
|
+
'GIT_FILTER_ATTRIBUTES_FROM_HEAD',
|
|
782
|
+
'GIT_FILTER_CLEAN',
|
|
783
|
+
'GIT_FILTER_DEFAULT',
|
|
784
|
+
'GIT_FILTER_DRIVER_PRIORITY',
|
|
785
|
+
'GIT_FILTER_NO_SYSTEM_ATTRIBUTES',
|
|
786
|
+
'GIT_FILTER_SMUDGE',
|
|
787
|
+
'GIT_FILTER_TO_ODB',
|
|
788
|
+
'GIT_FILTER_TO_WORKTREE',
|
|
789
|
+
'GIT_MERGE_ANALYSIS_FASTFORWARD',
|
|
790
|
+
'GIT_MERGE_ANALYSIS_NONE',
|
|
791
|
+
'GIT_MERGE_ANALYSIS_NORMAL',
|
|
792
|
+
'GIT_MERGE_ANALYSIS_UNBORN',
|
|
793
|
+
'GIT_MERGE_ANALYSIS_UP_TO_DATE',
|
|
794
|
+
'GIT_MERGE_PREFERENCE_FASTFORWARD_ONLY',
|
|
795
|
+
'GIT_MERGE_PREFERENCE_NO_FASTFORWARD',
|
|
796
|
+
'GIT_MERGE_PREFERENCE_NONE',
|
|
797
|
+
'GIT_OBJECT_ANY',
|
|
798
|
+
'GIT_OBJECT_BLOB',
|
|
799
|
+
'GIT_OBJECT_COMMIT',
|
|
800
|
+
'GIT_OBJECT_INVALID',
|
|
801
|
+
'GIT_OBJECT_OFS_DELTA',
|
|
802
|
+
'GIT_OBJECT_REF_DELTA',
|
|
803
|
+
'GIT_OBJECT_TAG',
|
|
804
|
+
'GIT_OBJECT_TREE',
|
|
805
|
+
'GIT_OPT_ADD_SSL_X509_CERT',
|
|
806
|
+
'GIT_OPT_DISABLE_PACK_KEEP_FILE_CHECKS',
|
|
807
|
+
'GIT_OPT_ENABLE_CACHING',
|
|
808
|
+
'GIT_OPT_ENABLE_FSYNC_GITDIR',
|
|
809
|
+
'GIT_OPT_ENABLE_HTTP_EXPECT_CONTINUE',
|
|
810
|
+
'GIT_OPT_ENABLE_OFS_DELTA',
|
|
811
|
+
'GIT_OPT_ENABLE_STRICT_HASH_VERIFICATION',
|
|
812
|
+
'GIT_OPT_ENABLE_STRICT_OBJECT_CREATION',
|
|
813
|
+
'GIT_OPT_ENABLE_STRICT_SYMBOLIC_REF_CREATION',
|
|
814
|
+
'GIT_OPT_ENABLE_UNSAVED_INDEX_SAFETY',
|
|
815
|
+
'GIT_OPT_GET_CACHED_MEMORY',
|
|
816
|
+
'GIT_OPT_GET_EXTENSIONS',
|
|
817
|
+
'GIT_OPT_GET_HOMEDIR',
|
|
818
|
+
'GIT_OPT_GET_MWINDOW_FILE_LIMIT',
|
|
819
|
+
'GIT_OPT_GET_MWINDOW_MAPPED_LIMIT',
|
|
820
|
+
'GIT_OPT_GET_MWINDOW_SIZE',
|
|
821
|
+
'GIT_OPT_GET_OWNER_VALIDATION',
|
|
822
|
+
'GIT_OPT_GET_PACK_MAX_OBJECTS',
|
|
823
|
+
'GIT_OPT_GET_SEARCH_PATH',
|
|
824
|
+
'GIT_OPT_GET_SERVER_CONNECT_TIMEOUT',
|
|
825
|
+
'GIT_OPT_GET_SERVER_TIMEOUT',
|
|
826
|
+
'GIT_OPT_GET_TEMPLATE_PATH',
|
|
827
|
+
'GIT_OPT_GET_USER_AGENT',
|
|
828
|
+
'GIT_OPT_GET_USER_AGENT_PRODUCT',
|
|
829
|
+
'GIT_OPT_GET_WINDOWS_SHAREMODE',
|
|
830
|
+
'GIT_OPT_SET_ALLOCATOR',
|
|
831
|
+
'GIT_OPT_SET_CACHE_MAX_SIZE',
|
|
832
|
+
'GIT_OPT_SET_CACHE_OBJECT_LIMIT',
|
|
833
|
+
'GIT_OPT_SET_EXTENSIONS',
|
|
834
|
+
'GIT_OPT_SET_HOMEDIR',
|
|
835
|
+
'GIT_OPT_SET_MWINDOW_FILE_LIMIT',
|
|
836
|
+
'GIT_OPT_SET_MWINDOW_MAPPED_LIMIT',
|
|
837
|
+
'GIT_OPT_SET_MWINDOW_SIZE',
|
|
838
|
+
'GIT_OPT_SET_ODB_LOOSE_PRIORITY',
|
|
839
|
+
'GIT_OPT_SET_ODB_PACKED_PRIORITY',
|
|
840
|
+
'GIT_OPT_SET_OWNER_VALIDATION',
|
|
841
|
+
'GIT_OPT_SET_PACK_MAX_OBJECTS',
|
|
842
|
+
'GIT_OPT_SET_SEARCH_PATH',
|
|
843
|
+
'GIT_OPT_SET_SERVER_CONNECT_TIMEOUT',
|
|
844
|
+
'GIT_OPT_SET_SERVER_TIMEOUT',
|
|
845
|
+
'GIT_OPT_SET_SSL_CERT_LOCATIONS',
|
|
846
|
+
'GIT_OPT_SET_SSL_CIPHERS',
|
|
847
|
+
'GIT_OPT_SET_TEMPLATE_PATH',
|
|
848
|
+
'GIT_OPT_SET_USER_AGENT',
|
|
849
|
+
'GIT_OPT_SET_USER_AGENT_PRODUCT',
|
|
850
|
+
'GIT_OPT_SET_WINDOWS_SHAREMODE',
|
|
851
|
+
'GIT_REFERENCES_ALL',
|
|
852
|
+
'GIT_REFERENCES_BRANCHES',
|
|
853
|
+
'GIT_REFERENCES_TAGS',
|
|
854
|
+
'GIT_RESET_HARD',
|
|
855
|
+
'GIT_RESET_MIXED',
|
|
856
|
+
'GIT_RESET_SOFT',
|
|
857
|
+
'GIT_REVSPEC_MERGE_BASE',
|
|
858
|
+
'GIT_REVSPEC_RANGE',
|
|
859
|
+
'GIT_REVSPEC_SINGLE',
|
|
860
|
+
'GIT_SORT_NONE',
|
|
861
|
+
'GIT_SORT_REVERSE',
|
|
862
|
+
'GIT_SORT_TIME',
|
|
863
|
+
'GIT_SORT_TOPOLOGICAL',
|
|
864
|
+
'GIT_STASH_APPLY_DEFAULT',
|
|
865
|
+
'GIT_STASH_APPLY_REINSTATE_INDEX',
|
|
866
|
+
'GIT_STASH_DEFAULT',
|
|
867
|
+
'GIT_STASH_INCLUDE_IGNORED',
|
|
868
|
+
'GIT_STASH_INCLUDE_UNTRACKED',
|
|
869
|
+
'GIT_STASH_KEEP_ALL',
|
|
870
|
+
'GIT_STASH_KEEP_INDEX',
|
|
871
|
+
'GIT_STATUS_CONFLICTED',
|
|
872
|
+
'GIT_STATUS_CURRENT',
|
|
873
|
+
'GIT_STATUS_IGNORED',
|
|
874
|
+
'GIT_STATUS_INDEX_DELETED',
|
|
875
|
+
'GIT_STATUS_INDEX_MODIFIED',
|
|
876
|
+
'GIT_STATUS_INDEX_NEW',
|
|
877
|
+
'GIT_STATUS_INDEX_RENAMED',
|
|
878
|
+
'GIT_STATUS_INDEX_TYPECHANGE',
|
|
879
|
+
'GIT_STATUS_WT_DELETED',
|
|
880
|
+
'GIT_STATUS_WT_MODIFIED',
|
|
881
|
+
'GIT_STATUS_WT_NEW',
|
|
882
|
+
'GIT_STATUS_WT_RENAMED',
|
|
883
|
+
'GIT_STATUS_WT_TYPECHANGE',
|
|
884
|
+
'GIT_STATUS_WT_UNREADABLE',
|
|
885
|
+
'GIT_SUBMODULE_IGNORE_ALL',
|
|
886
|
+
'GIT_SUBMODULE_IGNORE_DIRTY',
|
|
887
|
+
'GIT_SUBMODULE_IGNORE_NONE',
|
|
888
|
+
'GIT_SUBMODULE_IGNORE_UNSPECIFIED',
|
|
889
|
+
'GIT_SUBMODULE_IGNORE_UNTRACKED',
|
|
890
|
+
'GIT_SUBMODULE_STATUS_IN_CONFIG',
|
|
891
|
+
'GIT_SUBMODULE_STATUS_IN_HEAD',
|
|
892
|
+
'GIT_SUBMODULE_STATUS_IN_INDEX',
|
|
893
|
+
'GIT_SUBMODULE_STATUS_IN_WD',
|
|
894
|
+
'GIT_SUBMODULE_STATUS_INDEX_ADDED',
|
|
895
|
+
'GIT_SUBMODULE_STATUS_INDEX_DELETED',
|
|
896
|
+
'GIT_SUBMODULE_STATUS_INDEX_MODIFIED',
|
|
897
|
+
'GIT_SUBMODULE_STATUS_WD_ADDED',
|
|
898
|
+
'GIT_SUBMODULE_STATUS_WD_DELETED',
|
|
899
|
+
'GIT_SUBMODULE_STATUS_WD_INDEX_MODIFIED',
|
|
900
|
+
'GIT_SUBMODULE_STATUS_WD_MODIFIED',
|
|
901
|
+
'GIT_SUBMODULE_STATUS_WD_UNINITIALIZED',
|
|
902
|
+
'GIT_SUBMODULE_STATUS_WD_UNTRACKED',
|
|
903
|
+
'GIT_SUBMODULE_STATUS_WD_WD_MODIFIED',
|
|
904
|
+
# High level API.
|
|
905
|
+
'enums',
|
|
906
|
+
'blame',
|
|
907
|
+
'Blame',
|
|
908
|
+
'BlameHunk',
|
|
909
|
+
'blob',
|
|
910
|
+
'BlobIO',
|
|
911
|
+
'callbacks',
|
|
912
|
+
'Payload',
|
|
913
|
+
'RemoteCallbacks',
|
|
914
|
+
'CheckoutCallbacks',
|
|
915
|
+
'StashApplyCallbacks',
|
|
916
|
+
'git_clone_options',
|
|
917
|
+
'git_fetch_options',
|
|
918
|
+
'git_proxy_options',
|
|
919
|
+
'get_credentials',
|
|
920
|
+
'config',
|
|
921
|
+
'Config',
|
|
922
|
+
'credentials',
|
|
923
|
+
'CredentialType',
|
|
924
|
+
'Username',
|
|
925
|
+
'UserPass',
|
|
926
|
+
'Keypair',
|
|
927
|
+
'KeypairFromAgent',
|
|
928
|
+
'KeypairFromMemory',
|
|
929
|
+
'errors',
|
|
930
|
+
'check_error',
|
|
931
|
+
'Passthrough',
|
|
932
|
+
'ffi',
|
|
933
|
+
'C',
|
|
934
|
+
'filter',
|
|
935
|
+
'Filter',
|
|
936
|
+
'index',
|
|
937
|
+
'Index',
|
|
938
|
+
'IndexEntry',
|
|
939
|
+
'packbuilder',
|
|
940
|
+
'PackBuilder',
|
|
941
|
+
'rebase',
|
|
942
|
+
'Rebase',
|
|
943
|
+
'RebaseOperation',
|
|
944
|
+
'refspec',
|
|
945
|
+
'remotes',
|
|
946
|
+
'Remote',
|
|
947
|
+
'repository',
|
|
948
|
+
'Repository',
|
|
949
|
+
'RepositoryConfig',
|
|
950
|
+
'branches',
|
|
951
|
+
'references',
|
|
952
|
+
'settings',
|
|
953
|
+
'Settings',
|
|
954
|
+
'submodules',
|
|
955
|
+
'Submodule',
|
|
956
|
+
'transaction',
|
|
957
|
+
'ReferenceTransaction',
|
|
958
|
+
'utils',
|
|
959
|
+
# __init__ module defined symbols
|
|
960
|
+
'features',
|
|
961
|
+
'LIBGIT2_VER',
|
|
962
|
+
'init_repository',
|
|
963
|
+
'clone_repository',
|
|
964
|
+
'tree_entry_key',
|
|
965
|
+
)
|