pygit2 1.19.0__cp313-cp313-win_arm64.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 +986 -0
- pygit2/_build.py +74 -0
- pygit2/_libgit2.pyd +0 -0
- pygit2/_pygit2.cp313-win_arm64.pyd +0 -0
- pygit2/_pygit2.pyi +862 -0
- pygit2/_run.py +109 -0
- pygit2/blame.py +160 -0
- pygit2/blob.py +155 -0
- pygit2/branches.py +109 -0
- pygit2/callbacks.py +887 -0
- pygit2/config.py +384 -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 +54 -0
- pygit2/decl/describe.h +48 -0
- pygit2/decl/diff.h +91 -0
- pygit2/decl/errors.h +51 -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/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 +72 -0
- pygit2/enums.py +1302 -0
- pygit2/errors.py +73 -0
- pygit2/ffi.py +30 -0
- pygit2/filter.py +109 -0
- pygit2/git2.dll +0 -0
- pygit2/index.py +567 -0
- pygit2/legacyenums.py +113 -0
- pygit2/options.py +805 -0
- pygit2/packbuilder.py +87 -0
- pygit2/py.typed +1 -0
- pygit2/references.py +111 -0
- pygit2/refspec.py +97 -0
- pygit2/remotes.py +531 -0
- pygit2/repository.py +1803 -0
- pygit2/settings.py +348 -0
- pygit2/submodules.py +394 -0
- pygit2/transaction.py +199 -0
- pygit2/utils.py +225 -0
- pygit2-1.19.0.dist-info/METADATA +93 -0
- pygit2-1.19.0.dist-info/RECORD +67 -0
- pygit2-1.19.0.dist-info/WHEEL +5 -0
- pygit2-1.19.0.dist-info/licenses/AUTHORS.md +246 -0
- pygit2-1.19.0.dist-info/licenses/COPYING +361 -0
- pygit2-1.19.0.dist-info/top_level.txt +1 -0
pygit2/__init__.py
ADDED
|
@@ -0,0 +1,986 @@
|
|
|
1
|
+
# Copyright 2010-2025 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
|
|
35
|
+
from ._build import __version__
|
|
36
|
+
|
|
37
|
+
# Low level API
|
|
38
|
+
from ._pygit2 import (
|
|
39
|
+
GIT_APPLY_LOCATION_BOTH,
|
|
40
|
+
GIT_APPLY_LOCATION_INDEX,
|
|
41
|
+
GIT_APPLY_LOCATION_WORKDIR,
|
|
42
|
+
GIT_BLAME_FIRST_PARENT,
|
|
43
|
+
GIT_BLAME_IGNORE_WHITESPACE,
|
|
44
|
+
GIT_BLAME_NORMAL,
|
|
45
|
+
GIT_BLAME_TRACK_COPIES_ANY_COMMIT_COPIES,
|
|
46
|
+
GIT_BLAME_TRACK_COPIES_SAME_COMMIT_COPIES,
|
|
47
|
+
GIT_BLAME_TRACK_COPIES_SAME_COMMIT_MOVES,
|
|
48
|
+
GIT_BLAME_TRACK_COPIES_SAME_FILE,
|
|
49
|
+
GIT_BLAME_USE_MAILMAP,
|
|
50
|
+
GIT_BLOB_FILTER_ATTRIBUTES_FROM_COMMIT,
|
|
51
|
+
GIT_BLOB_FILTER_ATTRIBUTES_FROM_HEAD,
|
|
52
|
+
GIT_BLOB_FILTER_CHECK_FOR_BINARY,
|
|
53
|
+
GIT_BLOB_FILTER_NO_SYSTEM_ATTRIBUTES,
|
|
54
|
+
GIT_BRANCH_ALL,
|
|
55
|
+
GIT_BRANCH_LOCAL,
|
|
56
|
+
GIT_BRANCH_REMOTE,
|
|
57
|
+
GIT_CHECKOUT_ALLOW_CONFLICTS,
|
|
58
|
+
GIT_CHECKOUT_CONFLICT_STYLE_DIFF3,
|
|
59
|
+
GIT_CHECKOUT_CONFLICT_STYLE_MERGE,
|
|
60
|
+
GIT_CHECKOUT_CONFLICT_STYLE_ZDIFF3,
|
|
61
|
+
GIT_CHECKOUT_DISABLE_PATHSPEC_MATCH,
|
|
62
|
+
GIT_CHECKOUT_DONT_OVERWRITE_IGNORED,
|
|
63
|
+
GIT_CHECKOUT_DONT_REMOVE_EXISTING,
|
|
64
|
+
GIT_CHECKOUT_DONT_UPDATE_INDEX,
|
|
65
|
+
GIT_CHECKOUT_DONT_WRITE_INDEX,
|
|
66
|
+
GIT_CHECKOUT_DRY_RUN,
|
|
67
|
+
GIT_CHECKOUT_FORCE,
|
|
68
|
+
GIT_CHECKOUT_NO_REFRESH,
|
|
69
|
+
GIT_CHECKOUT_NONE,
|
|
70
|
+
GIT_CHECKOUT_RECREATE_MISSING,
|
|
71
|
+
GIT_CHECKOUT_REMOVE_IGNORED,
|
|
72
|
+
GIT_CHECKOUT_REMOVE_UNTRACKED,
|
|
73
|
+
GIT_CHECKOUT_SAFE,
|
|
74
|
+
GIT_CHECKOUT_SKIP_LOCKED_DIRECTORIES,
|
|
75
|
+
GIT_CHECKOUT_SKIP_UNMERGED,
|
|
76
|
+
GIT_CHECKOUT_UPDATE_ONLY,
|
|
77
|
+
GIT_CHECKOUT_USE_OURS,
|
|
78
|
+
GIT_CHECKOUT_USE_THEIRS,
|
|
79
|
+
GIT_CONFIG_HIGHEST_LEVEL,
|
|
80
|
+
GIT_CONFIG_LEVEL_APP,
|
|
81
|
+
GIT_CONFIG_LEVEL_GLOBAL,
|
|
82
|
+
GIT_CONFIG_LEVEL_LOCAL,
|
|
83
|
+
GIT_CONFIG_LEVEL_PROGRAMDATA,
|
|
84
|
+
GIT_CONFIG_LEVEL_SYSTEM,
|
|
85
|
+
GIT_CONFIG_LEVEL_WORKTREE,
|
|
86
|
+
GIT_CONFIG_LEVEL_XDG,
|
|
87
|
+
GIT_DELTA_ADDED,
|
|
88
|
+
GIT_DELTA_CONFLICTED,
|
|
89
|
+
GIT_DELTA_COPIED,
|
|
90
|
+
GIT_DELTA_DELETED,
|
|
91
|
+
GIT_DELTA_IGNORED,
|
|
92
|
+
GIT_DELTA_MODIFIED,
|
|
93
|
+
GIT_DELTA_RENAMED,
|
|
94
|
+
GIT_DELTA_TYPECHANGE,
|
|
95
|
+
GIT_DELTA_UNMODIFIED,
|
|
96
|
+
GIT_DELTA_UNREADABLE,
|
|
97
|
+
GIT_DELTA_UNTRACKED,
|
|
98
|
+
GIT_DESCRIBE_ALL,
|
|
99
|
+
GIT_DESCRIBE_DEFAULT,
|
|
100
|
+
GIT_DESCRIBE_TAGS,
|
|
101
|
+
GIT_DIFF_BREAK_REWRITES,
|
|
102
|
+
GIT_DIFF_BREAK_REWRITES_FOR_RENAMES_ONLY,
|
|
103
|
+
GIT_DIFF_DISABLE_PATHSPEC_MATCH,
|
|
104
|
+
GIT_DIFF_ENABLE_FAST_UNTRACKED_DIRS,
|
|
105
|
+
GIT_DIFF_FIND_ALL,
|
|
106
|
+
GIT_DIFF_FIND_AND_BREAK_REWRITES,
|
|
107
|
+
GIT_DIFF_FIND_BY_CONFIG,
|
|
108
|
+
GIT_DIFF_FIND_COPIES,
|
|
109
|
+
GIT_DIFF_FIND_COPIES_FROM_UNMODIFIED,
|
|
110
|
+
GIT_DIFF_FIND_DONT_IGNORE_WHITESPACE,
|
|
111
|
+
GIT_DIFF_FIND_EXACT_MATCH_ONLY,
|
|
112
|
+
GIT_DIFF_FIND_FOR_UNTRACKED,
|
|
113
|
+
GIT_DIFF_FIND_IGNORE_LEADING_WHITESPACE,
|
|
114
|
+
GIT_DIFF_FIND_IGNORE_WHITESPACE,
|
|
115
|
+
GIT_DIFF_FIND_REMOVE_UNMODIFIED,
|
|
116
|
+
GIT_DIFF_FIND_RENAMES,
|
|
117
|
+
GIT_DIFF_FIND_RENAMES_FROM_REWRITES,
|
|
118
|
+
GIT_DIFF_FIND_REWRITES,
|
|
119
|
+
GIT_DIFF_FLAG_BINARY,
|
|
120
|
+
GIT_DIFF_FLAG_EXISTS,
|
|
121
|
+
GIT_DIFF_FLAG_NOT_BINARY,
|
|
122
|
+
GIT_DIFF_FLAG_VALID_ID,
|
|
123
|
+
GIT_DIFF_FLAG_VALID_SIZE,
|
|
124
|
+
GIT_DIFF_FORCE_BINARY,
|
|
125
|
+
GIT_DIFF_FORCE_TEXT,
|
|
126
|
+
GIT_DIFF_IGNORE_BLANK_LINES,
|
|
127
|
+
GIT_DIFF_IGNORE_CASE,
|
|
128
|
+
GIT_DIFF_IGNORE_FILEMODE,
|
|
129
|
+
GIT_DIFF_IGNORE_SUBMODULES,
|
|
130
|
+
GIT_DIFF_IGNORE_WHITESPACE,
|
|
131
|
+
GIT_DIFF_IGNORE_WHITESPACE_CHANGE,
|
|
132
|
+
GIT_DIFF_IGNORE_WHITESPACE_EOL,
|
|
133
|
+
GIT_DIFF_INCLUDE_CASECHANGE,
|
|
134
|
+
GIT_DIFF_INCLUDE_IGNORED,
|
|
135
|
+
GIT_DIFF_INCLUDE_TYPECHANGE,
|
|
136
|
+
GIT_DIFF_INCLUDE_TYPECHANGE_TREES,
|
|
137
|
+
GIT_DIFF_INCLUDE_UNMODIFIED,
|
|
138
|
+
GIT_DIFF_INCLUDE_UNREADABLE,
|
|
139
|
+
GIT_DIFF_INCLUDE_UNREADABLE_AS_UNTRACKED,
|
|
140
|
+
GIT_DIFF_INCLUDE_UNTRACKED,
|
|
141
|
+
GIT_DIFF_INDENT_HEURISTIC,
|
|
142
|
+
GIT_DIFF_MINIMAL,
|
|
143
|
+
GIT_DIFF_NORMAL,
|
|
144
|
+
GIT_DIFF_PATIENCE,
|
|
145
|
+
GIT_DIFF_RECURSE_IGNORED_DIRS,
|
|
146
|
+
GIT_DIFF_RECURSE_UNTRACKED_DIRS,
|
|
147
|
+
GIT_DIFF_REVERSE,
|
|
148
|
+
GIT_DIFF_SHOW_BINARY,
|
|
149
|
+
GIT_DIFF_SHOW_UNMODIFIED,
|
|
150
|
+
GIT_DIFF_SHOW_UNTRACKED_CONTENT,
|
|
151
|
+
GIT_DIFF_SKIP_BINARY_CHECK,
|
|
152
|
+
GIT_DIFF_STATS_FULL,
|
|
153
|
+
GIT_DIFF_STATS_INCLUDE_SUMMARY,
|
|
154
|
+
GIT_DIFF_STATS_NONE,
|
|
155
|
+
GIT_DIFF_STATS_NUMBER,
|
|
156
|
+
GIT_DIFF_STATS_SHORT,
|
|
157
|
+
GIT_DIFF_UPDATE_INDEX,
|
|
158
|
+
GIT_FILEMODE_BLOB,
|
|
159
|
+
GIT_FILEMODE_BLOB_EXECUTABLE,
|
|
160
|
+
GIT_FILEMODE_COMMIT,
|
|
161
|
+
GIT_FILEMODE_LINK,
|
|
162
|
+
GIT_FILEMODE_TREE,
|
|
163
|
+
GIT_FILEMODE_UNREADABLE,
|
|
164
|
+
GIT_FILTER_ALLOW_UNSAFE,
|
|
165
|
+
GIT_FILTER_ATTRIBUTES_FROM_COMMIT,
|
|
166
|
+
GIT_FILTER_ATTRIBUTES_FROM_HEAD,
|
|
167
|
+
GIT_FILTER_CLEAN,
|
|
168
|
+
GIT_FILTER_DEFAULT,
|
|
169
|
+
GIT_FILTER_DRIVER_PRIORITY,
|
|
170
|
+
GIT_FILTER_NO_SYSTEM_ATTRIBUTES,
|
|
171
|
+
GIT_FILTER_SMUDGE,
|
|
172
|
+
GIT_FILTER_TO_ODB,
|
|
173
|
+
GIT_FILTER_TO_WORKTREE,
|
|
174
|
+
GIT_MERGE_ANALYSIS_FASTFORWARD,
|
|
175
|
+
GIT_MERGE_ANALYSIS_NONE,
|
|
176
|
+
GIT_MERGE_ANALYSIS_NORMAL,
|
|
177
|
+
GIT_MERGE_ANALYSIS_UNBORN,
|
|
178
|
+
GIT_MERGE_ANALYSIS_UP_TO_DATE,
|
|
179
|
+
GIT_MERGE_PREFERENCE_FASTFORWARD_ONLY,
|
|
180
|
+
GIT_MERGE_PREFERENCE_NO_FASTFORWARD,
|
|
181
|
+
GIT_MERGE_PREFERENCE_NONE,
|
|
182
|
+
GIT_OBJECT_ANY,
|
|
183
|
+
GIT_OBJECT_BLOB,
|
|
184
|
+
GIT_OBJECT_COMMIT,
|
|
185
|
+
GIT_OBJECT_INVALID,
|
|
186
|
+
GIT_OBJECT_OFS_DELTA,
|
|
187
|
+
GIT_OBJECT_REF_DELTA,
|
|
188
|
+
GIT_OBJECT_TAG,
|
|
189
|
+
GIT_OBJECT_TREE,
|
|
190
|
+
GIT_OID_HEX_ZERO,
|
|
191
|
+
GIT_OID_HEXSZ,
|
|
192
|
+
GIT_OID_MINPREFIXLEN,
|
|
193
|
+
GIT_OID_RAWSZ,
|
|
194
|
+
GIT_REFERENCES_ALL,
|
|
195
|
+
GIT_REFERENCES_BRANCHES,
|
|
196
|
+
GIT_REFERENCES_TAGS,
|
|
197
|
+
GIT_RESET_HARD,
|
|
198
|
+
GIT_RESET_MIXED,
|
|
199
|
+
GIT_RESET_SOFT,
|
|
200
|
+
GIT_REVSPEC_MERGE_BASE,
|
|
201
|
+
GIT_REVSPEC_RANGE,
|
|
202
|
+
GIT_REVSPEC_SINGLE,
|
|
203
|
+
GIT_SORT_NONE,
|
|
204
|
+
GIT_SORT_REVERSE,
|
|
205
|
+
GIT_SORT_TIME,
|
|
206
|
+
GIT_SORT_TOPOLOGICAL,
|
|
207
|
+
GIT_STASH_APPLY_DEFAULT,
|
|
208
|
+
GIT_STASH_APPLY_REINSTATE_INDEX,
|
|
209
|
+
GIT_STASH_DEFAULT,
|
|
210
|
+
GIT_STASH_INCLUDE_IGNORED,
|
|
211
|
+
GIT_STASH_INCLUDE_UNTRACKED,
|
|
212
|
+
GIT_STASH_KEEP_ALL,
|
|
213
|
+
GIT_STASH_KEEP_INDEX,
|
|
214
|
+
GIT_STATUS_CONFLICTED,
|
|
215
|
+
GIT_STATUS_CURRENT,
|
|
216
|
+
GIT_STATUS_IGNORED,
|
|
217
|
+
GIT_STATUS_INDEX_DELETED,
|
|
218
|
+
GIT_STATUS_INDEX_MODIFIED,
|
|
219
|
+
GIT_STATUS_INDEX_NEW,
|
|
220
|
+
GIT_STATUS_INDEX_RENAMED,
|
|
221
|
+
GIT_STATUS_INDEX_TYPECHANGE,
|
|
222
|
+
GIT_STATUS_WT_DELETED,
|
|
223
|
+
GIT_STATUS_WT_MODIFIED,
|
|
224
|
+
GIT_STATUS_WT_NEW,
|
|
225
|
+
GIT_STATUS_WT_RENAMED,
|
|
226
|
+
GIT_STATUS_WT_TYPECHANGE,
|
|
227
|
+
GIT_STATUS_WT_UNREADABLE,
|
|
228
|
+
GIT_SUBMODULE_IGNORE_ALL,
|
|
229
|
+
GIT_SUBMODULE_IGNORE_DIRTY,
|
|
230
|
+
GIT_SUBMODULE_IGNORE_NONE,
|
|
231
|
+
GIT_SUBMODULE_IGNORE_UNSPECIFIED,
|
|
232
|
+
GIT_SUBMODULE_IGNORE_UNTRACKED,
|
|
233
|
+
GIT_SUBMODULE_STATUS_IN_CONFIG,
|
|
234
|
+
GIT_SUBMODULE_STATUS_IN_HEAD,
|
|
235
|
+
GIT_SUBMODULE_STATUS_IN_INDEX,
|
|
236
|
+
GIT_SUBMODULE_STATUS_IN_WD,
|
|
237
|
+
GIT_SUBMODULE_STATUS_INDEX_ADDED,
|
|
238
|
+
GIT_SUBMODULE_STATUS_INDEX_DELETED,
|
|
239
|
+
GIT_SUBMODULE_STATUS_INDEX_MODIFIED,
|
|
240
|
+
GIT_SUBMODULE_STATUS_WD_ADDED,
|
|
241
|
+
GIT_SUBMODULE_STATUS_WD_DELETED,
|
|
242
|
+
GIT_SUBMODULE_STATUS_WD_INDEX_MODIFIED,
|
|
243
|
+
GIT_SUBMODULE_STATUS_WD_MODIFIED,
|
|
244
|
+
GIT_SUBMODULE_STATUS_WD_UNINITIALIZED,
|
|
245
|
+
GIT_SUBMODULE_STATUS_WD_UNTRACKED,
|
|
246
|
+
GIT_SUBMODULE_STATUS_WD_WD_MODIFIED,
|
|
247
|
+
LIBGIT2_VER_MAJOR,
|
|
248
|
+
LIBGIT2_VER_MINOR,
|
|
249
|
+
LIBGIT2_VER_REVISION,
|
|
250
|
+
LIBGIT2_VERSION,
|
|
251
|
+
AlreadyExistsError,
|
|
252
|
+
Blob,
|
|
253
|
+
Branch,
|
|
254
|
+
Commit,
|
|
255
|
+
Diff,
|
|
256
|
+
DiffDelta,
|
|
257
|
+
DiffFile,
|
|
258
|
+
DiffHunk,
|
|
259
|
+
DiffLine,
|
|
260
|
+
DiffStats,
|
|
261
|
+
FilterSource,
|
|
262
|
+
GitError,
|
|
263
|
+
InvalidSpecError,
|
|
264
|
+
Mailmap,
|
|
265
|
+
Note,
|
|
266
|
+
Object,
|
|
267
|
+
Odb,
|
|
268
|
+
OdbBackend,
|
|
269
|
+
OdbBackendLoose,
|
|
270
|
+
OdbBackendPack,
|
|
271
|
+
Oid,
|
|
272
|
+
Patch,
|
|
273
|
+
Refdb,
|
|
274
|
+
RefdbBackend,
|
|
275
|
+
RefdbFsBackend,
|
|
276
|
+
Reference,
|
|
277
|
+
RefLogEntry,
|
|
278
|
+
RevSpec,
|
|
279
|
+
Signature,
|
|
280
|
+
Stash,
|
|
281
|
+
Tag,
|
|
282
|
+
Tree,
|
|
283
|
+
TreeBuilder,
|
|
284
|
+
Walker,
|
|
285
|
+
Worktree,
|
|
286
|
+
_cache_enums,
|
|
287
|
+
discover_repository,
|
|
288
|
+
filter_register,
|
|
289
|
+
filter_unregister,
|
|
290
|
+
hash,
|
|
291
|
+
hashfile,
|
|
292
|
+
init_file_backend,
|
|
293
|
+
reference_is_valid_name,
|
|
294
|
+
tree_entry_cmp,
|
|
295
|
+
)
|
|
296
|
+
from .blame import Blame, BlameHunk
|
|
297
|
+
from .blob import BlobIO
|
|
298
|
+
from .callbacks import (
|
|
299
|
+
CheckoutCallbacks,
|
|
300
|
+
Payload,
|
|
301
|
+
RemoteCallbacks,
|
|
302
|
+
StashApplyCallbacks,
|
|
303
|
+
get_credentials,
|
|
304
|
+
git_clone_options,
|
|
305
|
+
git_fetch_options,
|
|
306
|
+
git_proxy_options,
|
|
307
|
+
)
|
|
308
|
+
from .config import Config
|
|
309
|
+
from .credentials import *
|
|
310
|
+
from .errors import Passthrough, check_error
|
|
311
|
+
from .ffi import C, ffi
|
|
312
|
+
from .filter import Filter
|
|
313
|
+
from .index import Index, IndexEntry
|
|
314
|
+
from .legacyenums import *
|
|
315
|
+
from .options import (
|
|
316
|
+
GIT_OPT_ADD_SSL_X509_CERT,
|
|
317
|
+
GIT_OPT_DISABLE_PACK_KEEP_FILE_CHECKS,
|
|
318
|
+
GIT_OPT_ENABLE_CACHING,
|
|
319
|
+
GIT_OPT_ENABLE_FSYNC_GITDIR,
|
|
320
|
+
GIT_OPT_ENABLE_HTTP_EXPECT_CONTINUE,
|
|
321
|
+
GIT_OPT_ENABLE_OFS_DELTA,
|
|
322
|
+
GIT_OPT_ENABLE_STRICT_HASH_VERIFICATION,
|
|
323
|
+
GIT_OPT_ENABLE_STRICT_OBJECT_CREATION,
|
|
324
|
+
GIT_OPT_ENABLE_STRICT_SYMBOLIC_REF_CREATION,
|
|
325
|
+
GIT_OPT_ENABLE_UNSAVED_INDEX_SAFETY,
|
|
326
|
+
GIT_OPT_GET_CACHED_MEMORY,
|
|
327
|
+
GIT_OPT_GET_EXTENSIONS,
|
|
328
|
+
GIT_OPT_GET_HOMEDIR,
|
|
329
|
+
GIT_OPT_GET_MWINDOW_FILE_LIMIT,
|
|
330
|
+
GIT_OPT_GET_MWINDOW_MAPPED_LIMIT,
|
|
331
|
+
GIT_OPT_GET_MWINDOW_SIZE,
|
|
332
|
+
GIT_OPT_GET_OWNER_VALIDATION,
|
|
333
|
+
GIT_OPT_GET_PACK_MAX_OBJECTS,
|
|
334
|
+
GIT_OPT_GET_SEARCH_PATH,
|
|
335
|
+
GIT_OPT_GET_SERVER_CONNECT_TIMEOUT,
|
|
336
|
+
GIT_OPT_GET_SERVER_TIMEOUT,
|
|
337
|
+
GIT_OPT_GET_TEMPLATE_PATH,
|
|
338
|
+
GIT_OPT_GET_USER_AGENT,
|
|
339
|
+
GIT_OPT_GET_USER_AGENT_PRODUCT,
|
|
340
|
+
GIT_OPT_GET_WINDOWS_SHAREMODE,
|
|
341
|
+
GIT_OPT_SET_ALLOCATOR,
|
|
342
|
+
GIT_OPT_SET_CACHE_MAX_SIZE,
|
|
343
|
+
GIT_OPT_SET_CACHE_OBJECT_LIMIT,
|
|
344
|
+
GIT_OPT_SET_EXTENSIONS,
|
|
345
|
+
GIT_OPT_SET_HOMEDIR,
|
|
346
|
+
GIT_OPT_SET_MWINDOW_FILE_LIMIT,
|
|
347
|
+
GIT_OPT_SET_MWINDOW_MAPPED_LIMIT,
|
|
348
|
+
GIT_OPT_SET_MWINDOW_SIZE,
|
|
349
|
+
GIT_OPT_SET_ODB_LOOSE_PRIORITY,
|
|
350
|
+
GIT_OPT_SET_ODB_PACKED_PRIORITY,
|
|
351
|
+
GIT_OPT_SET_OWNER_VALIDATION,
|
|
352
|
+
GIT_OPT_SET_PACK_MAX_OBJECTS,
|
|
353
|
+
GIT_OPT_SET_SEARCH_PATH,
|
|
354
|
+
GIT_OPT_SET_SERVER_CONNECT_TIMEOUT,
|
|
355
|
+
GIT_OPT_SET_SERVER_TIMEOUT,
|
|
356
|
+
GIT_OPT_SET_SSL_CERT_LOCATIONS,
|
|
357
|
+
GIT_OPT_SET_SSL_CIPHERS,
|
|
358
|
+
GIT_OPT_SET_TEMPLATE_PATH,
|
|
359
|
+
GIT_OPT_SET_USER_AGENT,
|
|
360
|
+
GIT_OPT_SET_USER_AGENT_PRODUCT,
|
|
361
|
+
GIT_OPT_SET_WINDOWS_SHAREMODE,
|
|
362
|
+
option,
|
|
363
|
+
)
|
|
364
|
+
from .packbuilder import PackBuilder
|
|
365
|
+
from .remotes import Remote
|
|
366
|
+
from .repository import Repository
|
|
367
|
+
from .settings import Settings
|
|
368
|
+
from .submodules import Submodule
|
|
369
|
+
from .transaction import ReferenceTransaction
|
|
370
|
+
from .utils import to_bytes, to_str
|
|
371
|
+
|
|
372
|
+
# Features
|
|
373
|
+
features = enums.Feature(C.git_libgit2_features())
|
|
374
|
+
|
|
375
|
+
# libgit version tuple
|
|
376
|
+
LIBGIT2_VER = (LIBGIT2_VER_MAJOR, LIBGIT2_VER_MINOR, LIBGIT2_VER_REVISION)
|
|
377
|
+
|
|
378
|
+
# Let _pygit2 cache references to Python enum types.
|
|
379
|
+
# This is separate from PyInit__pygit2() to avoid a circular import.
|
|
380
|
+
_cache_enums()
|
|
381
|
+
|
|
382
|
+
|
|
383
|
+
def init_repository(
|
|
384
|
+
path: str | bytes | os.PathLike[str] | os.PathLike[bytes] | None,
|
|
385
|
+
bare: bool = False,
|
|
386
|
+
flags: enums.RepositoryInitFlag = enums.RepositoryInitFlag.MKPATH,
|
|
387
|
+
mode: int | enums.RepositoryInitMode = enums.RepositoryInitMode.SHARED_UMASK,
|
|
388
|
+
workdir_path: typing.Optional[str] = None,
|
|
389
|
+
description: typing.Optional[str] = None,
|
|
390
|
+
template_path: typing.Optional[str] = None,
|
|
391
|
+
initial_head: typing.Optional[str] = None,
|
|
392
|
+
origin_url: typing.Optional[str] = None,
|
|
393
|
+
) -> Repository:
|
|
394
|
+
"""
|
|
395
|
+
Creates a new Git repository in the given *path*.
|
|
396
|
+
|
|
397
|
+
If *bare* is True the repository will be bare, i.e. it will not have a
|
|
398
|
+
working copy.
|
|
399
|
+
|
|
400
|
+
The *flags* may be a combination of enums.RepositoryInitFlag constants:
|
|
401
|
+
|
|
402
|
+
- BARE (overridden by the *bare* parameter)
|
|
403
|
+
- NO_REINIT
|
|
404
|
+
- NO_DOTGIT_DIR
|
|
405
|
+
- MKDIR
|
|
406
|
+
- MKPATH (set by default)
|
|
407
|
+
- EXTERNAL_TEMPLATE
|
|
408
|
+
|
|
409
|
+
The *mode* parameter may be any of the predefined modes in
|
|
410
|
+
enums.RepositoryInitMode (SHARED_UMASK being the default), or a custom int.
|
|
411
|
+
|
|
412
|
+
The *workdir_path*, *description*, *template_path*, *initial_head* and
|
|
413
|
+
*origin_url* are all strings.
|
|
414
|
+
|
|
415
|
+
If a repository already exists at *path*, it may be opened successfully but
|
|
416
|
+
you must not rely on that behavior and should use the Repository
|
|
417
|
+
constructor directly instead.
|
|
418
|
+
|
|
419
|
+
See libgit2's documentation on git_repository_init_ext for further details.
|
|
420
|
+
"""
|
|
421
|
+
# Pre-process input parameters
|
|
422
|
+
if path is None:
|
|
423
|
+
raise TypeError('Expected string type for path, found None.')
|
|
424
|
+
|
|
425
|
+
if bare:
|
|
426
|
+
flags |= enums.RepositoryInitFlag.BARE
|
|
427
|
+
|
|
428
|
+
# Options
|
|
429
|
+
options = ffi.new('git_repository_init_options *')
|
|
430
|
+
C.git_repository_init_options_init(options, C.GIT_REPOSITORY_INIT_OPTIONS_VERSION)
|
|
431
|
+
options.flags = int(flags)
|
|
432
|
+
options.mode = mode
|
|
433
|
+
|
|
434
|
+
if workdir_path:
|
|
435
|
+
workdir_path_ref = ffi.new('char []', to_bytes(workdir_path))
|
|
436
|
+
options.workdir_path = workdir_path_ref
|
|
437
|
+
|
|
438
|
+
if description:
|
|
439
|
+
description_ref = ffi.new('char []', to_bytes(description))
|
|
440
|
+
options.description = description_ref
|
|
441
|
+
|
|
442
|
+
if template_path:
|
|
443
|
+
template_path_ref = ffi.new('char []', to_bytes(template_path))
|
|
444
|
+
options.template_path = template_path_ref
|
|
445
|
+
|
|
446
|
+
if initial_head:
|
|
447
|
+
initial_head_ref = ffi.new('char []', to_bytes(initial_head))
|
|
448
|
+
options.initial_head = initial_head_ref
|
|
449
|
+
|
|
450
|
+
if origin_url:
|
|
451
|
+
origin_url_ref = ffi.new('char []', to_bytes(origin_url))
|
|
452
|
+
options.origin_url = origin_url_ref
|
|
453
|
+
|
|
454
|
+
# Call
|
|
455
|
+
crepository = ffi.new('git_repository **')
|
|
456
|
+
err = C.git_repository_init_ext(crepository, to_bytes(path), options)
|
|
457
|
+
check_error(err)
|
|
458
|
+
|
|
459
|
+
# Ok
|
|
460
|
+
return Repository(to_str(path))
|
|
461
|
+
|
|
462
|
+
|
|
463
|
+
def clone_repository(
|
|
464
|
+
url: str | bytes | os.PathLike[str] | os.PathLike[bytes],
|
|
465
|
+
path: str | bytes | os.PathLike[str] | os.PathLike[bytes],
|
|
466
|
+
bare: bool = False,
|
|
467
|
+
repository: typing.Callable | None = None,
|
|
468
|
+
remote: typing.Callable | None = None,
|
|
469
|
+
checkout_branch: str | bytes | None = None,
|
|
470
|
+
callbacks: RemoteCallbacks | None = None,
|
|
471
|
+
depth: int = 0,
|
|
472
|
+
proxy: None | bool | str = None,
|
|
473
|
+
) -> Repository:
|
|
474
|
+
"""
|
|
475
|
+
Clones a new Git repository from *url* in the given *path*.
|
|
476
|
+
|
|
477
|
+
Returns: a Repository class pointing to the newly cloned repository.
|
|
478
|
+
|
|
479
|
+
Parameters:
|
|
480
|
+
|
|
481
|
+
url : str or bytes or pathlike object
|
|
482
|
+
URL of the repository to clone.
|
|
483
|
+
path : str or bytes or pathlike object
|
|
484
|
+
Local path to clone into.
|
|
485
|
+
bare : bool
|
|
486
|
+
Whether the local repository should be bare.
|
|
487
|
+
remote : callable
|
|
488
|
+
Callback for the remote to use.
|
|
489
|
+
|
|
490
|
+
The remote callback has `(Repository, name, url) -> Remote` as a
|
|
491
|
+
signature. The Remote it returns will be used instead of the default
|
|
492
|
+
one.
|
|
493
|
+
repository : callable
|
|
494
|
+
Callback for the repository to use.
|
|
495
|
+
|
|
496
|
+
The repository callback has `(path, bare) -> Repository` as a
|
|
497
|
+
signature. The Repository it returns will be used instead of creating a
|
|
498
|
+
new one.
|
|
499
|
+
checkout_branch : str or bytes
|
|
500
|
+
Branch to checkout after the clone. The default is to use the remote's
|
|
501
|
+
default branch.
|
|
502
|
+
callbacks : RemoteCallbacks
|
|
503
|
+
Object which implements the callbacks as methods.
|
|
504
|
+
|
|
505
|
+
The callbacks should be an object which inherits from
|
|
506
|
+
`pyclass:RemoteCallbacks`.
|
|
507
|
+
depth : int
|
|
508
|
+
Number of commits to clone.
|
|
509
|
+
|
|
510
|
+
If greater than 0, creates a shallow clone with a history truncated to
|
|
511
|
+
the specified number of commits.
|
|
512
|
+
The default is 0 (full commit history).
|
|
513
|
+
proxy : None or True or str
|
|
514
|
+
Proxy configuration. Can be one of:
|
|
515
|
+
|
|
516
|
+
* `None` (the default) to disable proxy usage
|
|
517
|
+
* `True` to enable automatic proxy detection
|
|
518
|
+
* an url to a proxy (`http://proxy.example.org:3128/`)
|
|
519
|
+
"""
|
|
520
|
+
|
|
521
|
+
if callbacks is None:
|
|
522
|
+
callbacks = RemoteCallbacks()
|
|
523
|
+
|
|
524
|
+
# Add repository and remote to the payload
|
|
525
|
+
payload = callbacks
|
|
526
|
+
payload.repository = repository
|
|
527
|
+
payload.remote = remote
|
|
528
|
+
|
|
529
|
+
with git_clone_options(payload):
|
|
530
|
+
opts = payload.clone_options
|
|
531
|
+
opts.bare = bare
|
|
532
|
+
opts.fetch_opts.depth = depth
|
|
533
|
+
|
|
534
|
+
if checkout_branch:
|
|
535
|
+
checkout_branch_ref = ffi.new('char []', to_bytes(checkout_branch))
|
|
536
|
+
opts.checkout_branch = checkout_branch_ref
|
|
537
|
+
|
|
538
|
+
with git_fetch_options(payload, opts=opts.fetch_opts):
|
|
539
|
+
with git_proxy_options(payload, opts.fetch_opts.proxy_opts, proxy):
|
|
540
|
+
crepo = ffi.new('git_repository **')
|
|
541
|
+
err = C.git_clone(crepo, to_bytes(url), to_bytes(path), opts)
|
|
542
|
+
payload.check_error(err)
|
|
543
|
+
|
|
544
|
+
# Ok
|
|
545
|
+
return Repository._from_c(crepo[0], owned=True)
|
|
546
|
+
|
|
547
|
+
|
|
548
|
+
tree_entry_key = functools.cmp_to_key(tree_entry_cmp)
|
|
549
|
+
|
|
550
|
+
settings = Settings()
|
|
551
|
+
|
|
552
|
+
__all__ = (
|
|
553
|
+
# Standard Library
|
|
554
|
+
'functools',
|
|
555
|
+
'os',
|
|
556
|
+
'typing',
|
|
557
|
+
# Standard Library symbols
|
|
558
|
+
'TYPE_CHECKING',
|
|
559
|
+
'annotations',
|
|
560
|
+
# Low level API
|
|
561
|
+
'GIT_OID_HEX_ZERO',
|
|
562
|
+
'GIT_OID_HEXSZ',
|
|
563
|
+
'GIT_OID_MINPREFIXLEN',
|
|
564
|
+
'GIT_OID_RAWSZ',
|
|
565
|
+
'LIBGIT2_VER_MAJOR',
|
|
566
|
+
'LIBGIT2_VER_MINOR',
|
|
567
|
+
'LIBGIT2_VER_REVISION',
|
|
568
|
+
'LIBGIT2_VERSION',
|
|
569
|
+
'Object',
|
|
570
|
+
'Reference',
|
|
571
|
+
'AlreadyExistsError',
|
|
572
|
+
'Blob',
|
|
573
|
+
'Branch',
|
|
574
|
+
'Commit',
|
|
575
|
+
'Diff',
|
|
576
|
+
'DiffDelta',
|
|
577
|
+
'DiffFile',
|
|
578
|
+
'DiffHunk',
|
|
579
|
+
'DiffLine',
|
|
580
|
+
'DiffStats',
|
|
581
|
+
'GitError',
|
|
582
|
+
'InvalidSpecError',
|
|
583
|
+
'Mailmap',
|
|
584
|
+
'Note',
|
|
585
|
+
'Odb',
|
|
586
|
+
'OdbBackend',
|
|
587
|
+
'OdbBackendLoose',
|
|
588
|
+
'OdbBackendPack',
|
|
589
|
+
'Oid',
|
|
590
|
+
'Patch',
|
|
591
|
+
'RefLogEntry',
|
|
592
|
+
'Refdb',
|
|
593
|
+
'RefdbBackend',
|
|
594
|
+
'RefdbFsBackend',
|
|
595
|
+
'RevSpec',
|
|
596
|
+
'Signature',
|
|
597
|
+
'Stash',
|
|
598
|
+
'Tag',
|
|
599
|
+
'Tree',
|
|
600
|
+
'TreeBuilder',
|
|
601
|
+
'Walker',
|
|
602
|
+
'Worktree',
|
|
603
|
+
'discover_repository',
|
|
604
|
+
'hash',
|
|
605
|
+
'hashfile',
|
|
606
|
+
'init_file_backend',
|
|
607
|
+
'option',
|
|
608
|
+
'reference_is_valid_name',
|
|
609
|
+
'tree_entry_cmp',
|
|
610
|
+
# Low Level API (not present in .pyi)
|
|
611
|
+
'FilterSource',
|
|
612
|
+
'filter_register',
|
|
613
|
+
'filter_unregister',
|
|
614
|
+
'GIT_APPLY_LOCATION_BOTH',
|
|
615
|
+
'GIT_APPLY_LOCATION_INDEX',
|
|
616
|
+
'GIT_APPLY_LOCATION_WORKDIR',
|
|
617
|
+
'GIT_BLAME_FIRST_PARENT',
|
|
618
|
+
'GIT_BLAME_IGNORE_WHITESPACE',
|
|
619
|
+
'GIT_BLAME_NORMAL',
|
|
620
|
+
'GIT_BLAME_TRACK_COPIES_ANY_COMMIT_COPIES',
|
|
621
|
+
'GIT_BLAME_TRACK_COPIES_SAME_COMMIT_COPIES',
|
|
622
|
+
'GIT_BLAME_TRACK_COPIES_SAME_COMMIT_MOVES',
|
|
623
|
+
'GIT_BLAME_TRACK_COPIES_SAME_FILE',
|
|
624
|
+
'GIT_BLAME_USE_MAILMAP',
|
|
625
|
+
'GIT_BLOB_FILTER_ATTRIBUTES_FROM_COMMIT',
|
|
626
|
+
'GIT_BLOB_FILTER_ATTRIBUTES_FROM_HEAD',
|
|
627
|
+
'GIT_BLOB_FILTER_CHECK_FOR_BINARY',
|
|
628
|
+
'GIT_BLOB_FILTER_NO_SYSTEM_ATTRIBUTES',
|
|
629
|
+
'GIT_BRANCH_ALL',
|
|
630
|
+
'GIT_BRANCH_LOCAL',
|
|
631
|
+
'GIT_BRANCH_REMOTE',
|
|
632
|
+
'GIT_CHECKOUT_ALLOW_CONFLICTS',
|
|
633
|
+
'GIT_CHECKOUT_CONFLICT_STYLE_DIFF3',
|
|
634
|
+
'GIT_CHECKOUT_CONFLICT_STYLE_MERGE',
|
|
635
|
+
'GIT_CHECKOUT_CONFLICT_STYLE_ZDIFF3',
|
|
636
|
+
'GIT_CHECKOUT_DISABLE_PATHSPEC_MATCH',
|
|
637
|
+
'GIT_CHECKOUT_DONT_OVERWRITE_IGNORED',
|
|
638
|
+
'GIT_CHECKOUT_DONT_REMOVE_EXISTING',
|
|
639
|
+
'GIT_CHECKOUT_DONT_UPDATE_INDEX',
|
|
640
|
+
'GIT_CHECKOUT_DONT_WRITE_INDEX',
|
|
641
|
+
'GIT_CHECKOUT_DRY_RUN',
|
|
642
|
+
'GIT_CHECKOUT_FORCE',
|
|
643
|
+
'GIT_CHECKOUT_NO_REFRESH',
|
|
644
|
+
'GIT_CHECKOUT_NONE',
|
|
645
|
+
'GIT_CHECKOUT_RECREATE_MISSING',
|
|
646
|
+
'GIT_CHECKOUT_REMOVE_IGNORED',
|
|
647
|
+
'GIT_CHECKOUT_REMOVE_UNTRACKED',
|
|
648
|
+
'GIT_CHECKOUT_SAFE',
|
|
649
|
+
'GIT_CHECKOUT_SKIP_LOCKED_DIRECTORIES',
|
|
650
|
+
'GIT_CHECKOUT_SKIP_UNMERGED',
|
|
651
|
+
'GIT_CHECKOUT_UPDATE_ONLY',
|
|
652
|
+
'GIT_CHECKOUT_USE_OURS',
|
|
653
|
+
'GIT_CHECKOUT_USE_THEIRS',
|
|
654
|
+
'GIT_CONFIG_HIGHEST_LEVEL',
|
|
655
|
+
'GIT_CONFIG_LEVEL_APP',
|
|
656
|
+
'GIT_CONFIG_LEVEL_GLOBAL',
|
|
657
|
+
'GIT_CONFIG_LEVEL_LOCAL',
|
|
658
|
+
'GIT_CONFIG_LEVEL_PROGRAMDATA',
|
|
659
|
+
'GIT_CONFIG_LEVEL_SYSTEM',
|
|
660
|
+
'GIT_CONFIG_LEVEL_WORKTREE',
|
|
661
|
+
'GIT_CONFIG_LEVEL_XDG',
|
|
662
|
+
'GIT_DELTA_ADDED',
|
|
663
|
+
'GIT_DELTA_CONFLICTED',
|
|
664
|
+
'GIT_DELTA_COPIED',
|
|
665
|
+
'GIT_DELTA_DELETED',
|
|
666
|
+
'GIT_DELTA_IGNORED',
|
|
667
|
+
'GIT_DELTA_MODIFIED',
|
|
668
|
+
'GIT_DELTA_RENAMED',
|
|
669
|
+
'GIT_DELTA_TYPECHANGE',
|
|
670
|
+
'GIT_DELTA_UNMODIFIED',
|
|
671
|
+
'GIT_DELTA_UNREADABLE',
|
|
672
|
+
'GIT_DELTA_UNTRACKED',
|
|
673
|
+
'GIT_DESCRIBE_ALL',
|
|
674
|
+
'GIT_DESCRIBE_DEFAULT',
|
|
675
|
+
'GIT_DESCRIBE_TAGS',
|
|
676
|
+
'GIT_DIFF_BREAK_REWRITES_FOR_RENAMES_ONLY',
|
|
677
|
+
'GIT_DIFF_BREAK_REWRITES',
|
|
678
|
+
'GIT_DIFF_DISABLE_PATHSPEC_MATCH',
|
|
679
|
+
'GIT_DIFF_ENABLE_FAST_UNTRACKED_DIRS',
|
|
680
|
+
'GIT_DIFF_FIND_ALL',
|
|
681
|
+
'GIT_DIFF_FIND_AND_BREAK_REWRITES',
|
|
682
|
+
'GIT_DIFF_FIND_BY_CONFIG',
|
|
683
|
+
'GIT_DIFF_FIND_COPIES_FROM_UNMODIFIED',
|
|
684
|
+
'GIT_DIFF_FIND_COPIES',
|
|
685
|
+
'GIT_DIFF_FIND_DONT_IGNORE_WHITESPACE',
|
|
686
|
+
'GIT_DIFF_FIND_EXACT_MATCH_ONLY',
|
|
687
|
+
'GIT_DIFF_FIND_FOR_UNTRACKED',
|
|
688
|
+
'GIT_DIFF_FIND_IGNORE_LEADING_WHITESPACE',
|
|
689
|
+
'GIT_DIFF_FIND_IGNORE_WHITESPACE',
|
|
690
|
+
'GIT_DIFF_FIND_REMOVE_UNMODIFIED',
|
|
691
|
+
'GIT_DIFF_FIND_RENAMES_FROM_REWRITES',
|
|
692
|
+
'GIT_DIFF_FIND_RENAMES',
|
|
693
|
+
'GIT_DIFF_FIND_REWRITES',
|
|
694
|
+
'GIT_DIFF_FLAG_BINARY',
|
|
695
|
+
'GIT_DIFF_FLAG_EXISTS',
|
|
696
|
+
'GIT_DIFF_FLAG_NOT_BINARY',
|
|
697
|
+
'GIT_DIFF_FLAG_VALID_ID',
|
|
698
|
+
'GIT_DIFF_FLAG_VALID_SIZE',
|
|
699
|
+
'GIT_DIFF_FORCE_BINARY',
|
|
700
|
+
'GIT_DIFF_FORCE_TEXT',
|
|
701
|
+
'GIT_DIFF_IGNORE_BLANK_LINES',
|
|
702
|
+
'GIT_DIFF_IGNORE_CASE',
|
|
703
|
+
'GIT_DIFF_IGNORE_FILEMODE',
|
|
704
|
+
'GIT_DIFF_IGNORE_SUBMODULES',
|
|
705
|
+
'GIT_DIFF_IGNORE_WHITESPACE_CHANGE',
|
|
706
|
+
'GIT_DIFF_IGNORE_WHITESPACE_EOL',
|
|
707
|
+
'GIT_DIFF_IGNORE_WHITESPACE',
|
|
708
|
+
'GIT_DIFF_INCLUDE_CASECHANGE',
|
|
709
|
+
'GIT_DIFF_INCLUDE_IGNORED',
|
|
710
|
+
'GIT_DIFF_INCLUDE_TYPECHANGE_TREES',
|
|
711
|
+
'GIT_DIFF_INCLUDE_TYPECHANGE',
|
|
712
|
+
'GIT_DIFF_INCLUDE_UNMODIFIED',
|
|
713
|
+
'GIT_DIFF_INCLUDE_UNREADABLE_AS_UNTRACKED',
|
|
714
|
+
'GIT_DIFF_INCLUDE_UNREADABLE',
|
|
715
|
+
'GIT_DIFF_INCLUDE_UNTRACKED',
|
|
716
|
+
'GIT_DIFF_INDENT_HEURISTIC',
|
|
717
|
+
'GIT_DIFF_MINIMAL',
|
|
718
|
+
'GIT_DIFF_NORMAL',
|
|
719
|
+
'GIT_DIFF_PATIENCE',
|
|
720
|
+
'GIT_DIFF_RECURSE_IGNORED_DIRS',
|
|
721
|
+
'GIT_DIFF_RECURSE_UNTRACKED_DIRS',
|
|
722
|
+
'GIT_DIFF_REVERSE',
|
|
723
|
+
'GIT_DIFF_SHOW_BINARY',
|
|
724
|
+
'GIT_DIFF_SHOW_UNMODIFIED',
|
|
725
|
+
'GIT_DIFF_SHOW_UNTRACKED_CONTENT',
|
|
726
|
+
'GIT_DIFF_SKIP_BINARY_CHECK',
|
|
727
|
+
'GIT_DIFF_STATS_FULL',
|
|
728
|
+
'GIT_DIFF_STATS_INCLUDE_SUMMARY',
|
|
729
|
+
'GIT_DIFF_STATS_NONE',
|
|
730
|
+
'GIT_DIFF_STATS_NUMBER',
|
|
731
|
+
'GIT_DIFF_STATS_SHORT',
|
|
732
|
+
'GIT_DIFF_UPDATE_INDEX',
|
|
733
|
+
'GIT_FILEMODE_BLOB_EXECUTABLE',
|
|
734
|
+
'GIT_FILEMODE_BLOB',
|
|
735
|
+
'GIT_FILEMODE_COMMIT',
|
|
736
|
+
'GIT_FILEMODE_LINK',
|
|
737
|
+
'GIT_FILEMODE_TREE',
|
|
738
|
+
'GIT_FILEMODE_UNREADABLE',
|
|
739
|
+
'GIT_FILTER_ALLOW_UNSAFE',
|
|
740
|
+
'GIT_FILTER_ATTRIBUTES_FROM_COMMIT',
|
|
741
|
+
'GIT_FILTER_ATTRIBUTES_FROM_HEAD',
|
|
742
|
+
'GIT_FILTER_CLEAN',
|
|
743
|
+
'GIT_FILTER_DEFAULT',
|
|
744
|
+
'GIT_FILTER_DRIVER_PRIORITY',
|
|
745
|
+
'GIT_FILTER_NO_SYSTEM_ATTRIBUTES',
|
|
746
|
+
'GIT_FILTER_SMUDGE',
|
|
747
|
+
'GIT_FILTER_TO_ODB',
|
|
748
|
+
'GIT_FILTER_TO_WORKTREE',
|
|
749
|
+
'GIT_MERGE_ANALYSIS_FASTFORWARD',
|
|
750
|
+
'GIT_MERGE_ANALYSIS_NONE',
|
|
751
|
+
'GIT_MERGE_ANALYSIS_NORMAL',
|
|
752
|
+
'GIT_MERGE_ANALYSIS_UNBORN',
|
|
753
|
+
'GIT_MERGE_ANALYSIS_UP_TO_DATE',
|
|
754
|
+
'GIT_MERGE_PREFERENCE_FASTFORWARD_ONLY',
|
|
755
|
+
'GIT_MERGE_PREFERENCE_NO_FASTFORWARD',
|
|
756
|
+
'GIT_MERGE_PREFERENCE_NONE',
|
|
757
|
+
'GIT_OBJECT_ANY',
|
|
758
|
+
'GIT_OBJECT_BLOB',
|
|
759
|
+
'GIT_OBJECT_COMMIT',
|
|
760
|
+
'GIT_OBJECT_INVALID',
|
|
761
|
+
'GIT_OBJECT_OFS_DELTA',
|
|
762
|
+
'GIT_OBJECT_REF_DELTA',
|
|
763
|
+
'GIT_OBJECT_TAG',
|
|
764
|
+
'GIT_OBJECT_TREE',
|
|
765
|
+
'GIT_OPT_ADD_SSL_X509_CERT',
|
|
766
|
+
'GIT_OPT_DISABLE_PACK_KEEP_FILE_CHECKS',
|
|
767
|
+
'GIT_OPT_ENABLE_CACHING',
|
|
768
|
+
'GIT_OPT_ENABLE_FSYNC_GITDIR',
|
|
769
|
+
'GIT_OPT_ENABLE_HTTP_EXPECT_CONTINUE',
|
|
770
|
+
'GIT_OPT_ENABLE_OFS_DELTA',
|
|
771
|
+
'GIT_OPT_ENABLE_STRICT_HASH_VERIFICATION',
|
|
772
|
+
'GIT_OPT_ENABLE_STRICT_OBJECT_CREATION',
|
|
773
|
+
'GIT_OPT_ENABLE_STRICT_SYMBOLIC_REF_CREATION',
|
|
774
|
+
'GIT_OPT_ENABLE_UNSAVED_INDEX_SAFETY',
|
|
775
|
+
'GIT_OPT_GET_CACHED_MEMORY',
|
|
776
|
+
'GIT_OPT_GET_EXTENSIONS',
|
|
777
|
+
'GIT_OPT_GET_HOMEDIR',
|
|
778
|
+
'GIT_OPT_GET_MWINDOW_FILE_LIMIT',
|
|
779
|
+
'GIT_OPT_GET_MWINDOW_MAPPED_LIMIT',
|
|
780
|
+
'GIT_OPT_GET_MWINDOW_SIZE',
|
|
781
|
+
'GIT_OPT_GET_OWNER_VALIDATION',
|
|
782
|
+
'GIT_OPT_GET_PACK_MAX_OBJECTS',
|
|
783
|
+
'GIT_OPT_GET_SEARCH_PATH',
|
|
784
|
+
'GIT_OPT_GET_SERVER_CONNECT_TIMEOUT',
|
|
785
|
+
'GIT_OPT_GET_SERVER_TIMEOUT',
|
|
786
|
+
'GIT_OPT_GET_TEMPLATE_PATH',
|
|
787
|
+
'GIT_OPT_GET_USER_AGENT',
|
|
788
|
+
'GIT_OPT_GET_USER_AGENT_PRODUCT',
|
|
789
|
+
'GIT_OPT_GET_WINDOWS_SHAREMODE',
|
|
790
|
+
'GIT_OPT_SET_ALLOCATOR',
|
|
791
|
+
'GIT_OPT_SET_CACHE_MAX_SIZE',
|
|
792
|
+
'GIT_OPT_SET_CACHE_OBJECT_LIMIT',
|
|
793
|
+
'GIT_OPT_SET_EXTENSIONS',
|
|
794
|
+
'GIT_OPT_SET_HOMEDIR',
|
|
795
|
+
'GIT_OPT_SET_MWINDOW_FILE_LIMIT',
|
|
796
|
+
'GIT_OPT_SET_MWINDOW_MAPPED_LIMIT',
|
|
797
|
+
'GIT_OPT_SET_MWINDOW_SIZE',
|
|
798
|
+
'GIT_OPT_SET_ODB_LOOSE_PRIORITY',
|
|
799
|
+
'GIT_OPT_SET_ODB_PACKED_PRIORITY',
|
|
800
|
+
'GIT_OPT_SET_OWNER_VALIDATION',
|
|
801
|
+
'GIT_OPT_SET_PACK_MAX_OBJECTS',
|
|
802
|
+
'GIT_OPT_SET_SEARCH_PATH',
|
|
803
|
+
'GIT_OPT_SET_SERVER_CONNECT_TIMEOUT',
|
|
804
|
+
'GIT_OPT_SET_SERVER_TIMEOUT',
|
|
805
|
+
'GIT_OPT_SET_SSL_CERT_LOCATIONS',
|
|
806
|
+
'GIT_OPT_SET_SSL_CIPHERS',
|
|
807
|
+
'GIT_OPT_SET_TEMPLATE_PATH',
|
|
808
|
+
'GIT_OPT_SET_USER_AGENT',
|
|
809
|
+
'GIT_OPT_SET_USER_AGENT_PRODUCT',
|
|
810
|
+
'GIT_OPT_SET_WINDOWS_SHAREMODE',
|
|
811
|
+
'GIT_REFERENCES_ALL',
|
|
812
|
+
'GIT_REFERENCES_BRANCHES',
|
|
813
|
+
'GIT_REFERENCES_TAGS',
|
|
814
|
+
'GIT_RESET_HARD',
|
|
815
|
+
'GIT_RESET_MIXED',
|
|
816
|
+
'GIT_RESET_SOFT',
|
|
817
|
+
'GIT_REVSPEC_MERGE_BASE',
|
|
818
|
+
'GIT_REVSPEC_RANGE',
|
|
819
|
+
'GIT_REVSPEC_SINGLE',
|
|
820
|
+
'GIT_SORT_NONE',
|
|
821
|
+
'GIT_SORT_REVERSE',
|
|
822
|
+
'GIT_SORT_TIME',
|
|
823
|
+
'GIT_SORT_TOPOLOGICAL',
|
|
824
|
+
'GIT_STASH_APPLY_DEFAULT',
|
|
825
|
+
'GIT_STASH_APPLY_REINSTATE_INDEX',
|
|
826
|
+
'GIT_STASH_DEFAULT',
|
|
827
|
+
'GIT_STASH_INCLUDE_IGNORED',
|
|
828
|
+
'GIT_STASH_INCLUDE_UNTRACKED',
|
|
829
|
+
'GIT_STASH_KEEP_ALL',
|
|
830
|
+
'GIT_STASH_KEEP_INDEX',
|
|
831
|
+
'GIT_STATUS_CONFLICTED',
|
|
832
|
+
'GIT_STATUS_CURRENT',
|
|
833
|
+
'GIT_STATUS_IGNORED',
|
|
834
|
+
'GIT_STATUS_INDEX_DELETED',
|
|
835
|
+
'GIT_STATUS_INDEX_MODIFIED',
|
|
836
|
+
'GIT_STATUS_INDEX_NEW',
|
|
837
|
+
'GIT_STATUS_INDEX_RENAMED',
|
|
838
|
+
'GIT_STATUS_INDEX_TYPECHANGE',
|
|
839
|
+
'GIT_STATUS_WT_DELETED',
|
|
840
|
+
'GIT_STATUS_WT_MODIFIED',
|
|
841
|
+
'GIT_STATUS_WT_NEW',
|
|
842
|
+
'GIT_STATUS_WT_RENAMED',
|
|
843
|
+
'GIT_STATUS_WT_TYPECHANGE',
|
|
844
|
+
'GIT_STATUS_WT_UNREADABLE',
|
|
845
|
+
'GIT_SUBMODULE_IGNORE_ALL',
|
|
846
|
+
'GIT_SUBMODULE_IGNORE_DIRTY',
|
|
847
|
+
'GIT_SUBMODULE_IGNORE_NONE',
|
|
848
|
+
'GIT_SUBMODULE_IGNORE_UNSPECIFIED',
|
|
849
|
+
'GIT_SUBMODULE_IGNORE_UNTRACKED',
|
|
850
|
+
'GIT_SUBMODULE_STATUS_IN_CONFIG',
|
|
851
|
+
'GIT_SUBMODULE_STATUS_IN_HEAD',
|
|
852
|
+
'GIT_SUBMODULE_STATUS_IN_INDEX',
|
|
853
|
+
'GIT_SUBMODULE_STATUS_IN_WD',
|
|
854
|
+
'GIT_SUBMODULE_STATUS_INDEX_ADDED',
|
|
855
|
+
'GIT_SUBMODULE_STATUS_INDEX_DELETED',
|
|
856
|
+
'GIT_SUBMODULE_STATUS_INDEX_MODIFIED',
|
|
857
|
+
'GIT_SUBMODULE_STATUS_WD_ADDED',
|
|
858
|
+
'GIT_SUBMODULE_STATUS_WD_DELETED',
|
|
859
|
+
'GIT_SUBMODULE_STATUS_WD_INDEX_MODIFIED',
|
|
860
|
+
'GIT_SUBMODULE_STATUS_WD_MODIFIED',
|
|
861
|
+
'GIT_SUBMODULE_STATUS_WD_UNINITIALIZED',
|
|
862
|
+
'GIT_SUBMODULE_STATUS_WD_UNTRACKED',
|
|
863
|
+
'GIT_SUBMODULE_STATUS_WD_WD_MODIFIED',
|
|
864
|
+
# High level API.
|
|
865
|
+
'enums',
|
|
866
|
+
'blame',
|
|
867
|
+
'Blame',
|
|
868
|
+
'BlameHunk',
|
|
869
|
+
'blob',
|
|
870
|
+
'BlobIO',
|
|
871
|
+
'callbacks',
|
|
872
|
+
'Payload',
|
|
873
|
+
'RemoteCallbacks',
|
|
874
|
+
'CheckoutCallbacks',
|
|
875
|
+
'StashApplyCallbacks',
|
|
876
|
+
'git_clone_options',
|
|
877
|
+
'git_fetch_options',
|
|
878
|
+
'git_proxy_options',
|
|
879
|
+
'get_credentials',
|
|
880
|
+
'config',
|
|
881
|
+
'Config',
|
|
882
|
+
'credentials',
|
|
883
|
+
'CredentialType',
|
|
884
|
+
'Username',
|
|
885
|
+
'UserPass',
|
|
886
|
+
'Keypair',
|
|
887
|
+
'KeypairFromAgent',
|
|
888
|
+
'KeypairFromMemory',
|
|
889
|
+
'errors',
|
|
890
|
+
'check_error',
|
|
891
|
+
'Passthrough',
|
|
892
|
+
'ffi',
|
|
893
|
+
'C',
|
|
894
|
+
'filter',
|
|
895
|
+
'Filter',
|
|
896
|
+
'index',
|
|
897
|
+
'Index',
|
|
898
|
+
'IndexEntry',
|
|
899
|
+
'legacyenums',
|
|
900
|
+
'GIT_FEATURE_THREADS',
|
|
901
|
+
'GIT_FEATURE_HTTPS',
|
|
902
|
+
'GIT_FEATURE_SSH',
|
|
903
|
+
'GIT_FEATURE_NSEC',
|
|
904
|
+
'GIT_REPOSITORY_INIT_BARE',
|
|
905
|
+
'GIT_REPOSITORY_INIT_NO_REINIT',
|
|
906
|
+
'GIT_REPOSITORY_INIT_NO_DOTGIT_DIR',
|
|
907
|
+
'GIT_REPOSITORY_INIT_MKDIR',
|
|
908
|
+
'GIT_REPOSITORY_INIT_MKPATH',
|
|
909
|
+
'GIT_REPOSITORY_INIT_EXTERNAL_TEMPLATE',
|
|
910
|
+
'GIT_REPOSITORY_INIT_RELATIVE_GITLINK',
|
|
911
|
+
'GIT_REPOSITORY_INIT_SHARED_UMASK',
|
|
912
|
+
'GIT_REPOSITORY_INIT_SHARED_GROUP',
|
|
913
|
+
'GIT_REPOSITORY_INIT_SHARED_ALL',
|
|
914
|
+
'GIT_REPOSITORY_OPEN_NO_SEARCH',
|
|
915
|
+
'GIT_REPOSITORY_OPEN_CROSS_FS',
|
|
916
|
+
'GIT_REPOSITORY_OPEN_BARE',
|
|
917
|
+
'GIT_REPOSITORY_OPEN_NO_DOTGIT',
|
|
918
|
+
'GIT_REPOSITORY_OPEN_FROM_ENV',
|
|
919
|
+
'GIT_REPOSITORY_STATE_NONE',
|
|
920
|
+
'GIT_REPOSITORY_STATE_MERGE',
|
|
921
|
+
'GIT_REPOSITORY_STATE_REVERT',
|
|
922
|
+
'GIT_REPOSITORY_STATE_REVERT_SEQUENCE',
|
|
923
|
+
'GIT_REPOSITORY_STATE_CHERRYPICK',
|
|
924
|
+
'GIT_REPOSITORY_STATE_CHERRYPICK_SEQUENCE',
|
|
925
|
+
'GIT_REPOSITORY_STATE_BISECT',
|
|
926
|
+
'GIT_REPOSITORY_STATE_REBASE',
|
|
927
|
+
'GIT_REPOSITORY_STATE_REBASE_INTERACTIVE',
|
|
928
|
+
'GIT_REPOSITORY_STATE_REBASE_MERGE',
|
|
929
|
+
'GIT_REPOSITORY_STATE_APPLY_MAILBOX',
|
|
930
|
+
'GIT_REPOSITORY_STATE_APPLY_MAILBOX_OR_REBASE',
|
|
931
|
+
'GIT_ATTR_CHECK_FILE_THEN_INDEX',
|
|
932
|
+
'GIT_ATTR_CHECK_INDEX_THEN_FILE',
|
|
933
|
+
'GIT_ATTR_CHECK_INDEX_ONLY',
|
|
934
|
+
'GIT_ATTR_CHECK_NO_SYSTEM',
|
|
935
|
+
'GIT_ATTR_CHECK_INCLUDE_HEAD',
|
|
936
|
+
'GIT_ATTR_CHECK_INCLUDE_COMMIT',
|
|
937
|
+
'GIT_FETCH_PRUNE_UNSPECIFIED',
|
|
938
|
+
'GIT_FETCH_PRUNE',
|
|
939
|
+
'GIT_FETCH_NO_PRUNE',
|
|
940
|
+
'GIT_CHECKOUT_NOTIFY_NONE',
|
|
941
|
+
'GIT_CHECKOUT_NOTIFY_CONFLICT',
|
|
942
|
+
'GIT_CHECKOUT_NOTIFY_DIRTY',
|
|
943
|
+
'GIT_CHECKOUT_NOTIFY_UPDATED',
|
|
944
|
+
'GIT_CHECKOUT_NOTIFY_UNTRACKED',
|
|
945
|
+
'GIT_CHECKOUT_NOTIFY_IGNORED',
|
|
946
|
+
'GIT_CHECKOUT_NOTIFY_ALL',
|
|
947
|
+
'GIT_STASH_APPLY_PROGRESS_NONE',
|
|
948
|
+
'GIT_STASH_APPLY_PROGRESS_LOADING_STASH',
|
|
949
|
+
'GIT_STASH_APPLY_PROGRESS_ANALYZE_INDEX',
|
|
950
|
+
'GIT_STASH_APPLY_PROGRESS_ANALYZE_MODIFIED',
|
|
951
|
+
'GIT_STASH_APPLY_PROGRESS_ANALYZE_UNTRACKED',
|
|
952
|
+
'GIT_STASH_APPLY_PROGRESS_CHECKOUT_UNTRACKED',
|
|
953
|
+
'GIT_STASH_APPLY_PROGRESS_CHECKOUT_MODIFIED',
|
|
954
|
+
'GIT_STASH_APPLY_PROGRESS_DONE',
|
|
955
|
+
'GIT_CREDENTIAL_USERPASS_PLAINTEXT',
|
|
956
|
+
'GIT_CREDENTIAL_SSH_KEY',
|
|
957
|
+
'GIT_CREDENTIAL_SSH_CUSTOM',
|
|
958
|
+
'GIT_CREDENTIAL_DEFAULT',
|
|
959
|
+
'GIT_CREDENTIAL_SSH_INTERACTIVE',
|
|
960
|
+
'GIT_CREDENTIAL_USERNAME',
|
|
961
|
+
'GIT_CREDENTIAL_SSH_MEMORY',
|
|
962
|
+
'packbuilder',
|
|
963
|
+
'PackBuilder',
|
|
964
|
+
'refspec',
|
|
965
|
+
'remotes',
|
|
966
|
+
'Remote',
|
|
967
|
+
'repository',
|
|
968
|
+
'Repository',
|
|
969
|
+
'branches',
|
|
970
|
+
'references',
|
|
971
|
+
'settings',
|
|
972
|
+
'Settings',
|
|
973
|
+
'submodules',
|
|
974
|
+
'Submodule',
|
|
975
|
+
'transaction',
|
|
976
|
+
'ReferenceTransaction',
|
|
977
|
+
'utils',
|
|
978
|
+
'to_bytes',
|
|
979
|
+
'to_str',
|
|
980
|
+
# __init__ module defined symbols
|
|
981
|
+
'features',
|
|
982
|
+
'LIBGIT2_VER',
|
|
983
|
+
'init_repository',
|
|
984
|
+
'clone_repository',
|
|
985
|
+
'tree_entry_key',
|
|
986
|
+
)
|