rb-libgit2 0.27.7

Sign up to get free protection for your applications and to get access to all the features.
data/lib/git2/git2.rb ADDED
@@ -0,0 +1,2402 @@
1
+ require 'ffi'
2
+
3
+ module Git2
4
+ extend FFI::Library
5
+ ffi_lib "git2"
6
+
7
+ def self.attach_function(name, *_)
8
+ super
9
+ rescue FFI::NotFoundError => e
10
+ class_eval do
11
+ define_method(name) { |*_| raise e }
12
+ end
13
+ end
14
+
15
+ GIT_ATTR_CHECK_FILE_THEN_INDEX = "0"
16
+ GIT_ATTR_CHECK_INDEX_ONLY = "2"
17
+ GIT_ATTR_CHECK_INDEX_THEN_FILE = "1"
18
+ GIT_ATTR_CHECK_NO_SYSTEM = "( 1 << 2 )"
19
+ GIT_BLAME_OPTIONS_INIT = "{ 1 }"
20
+ GIT_BLAME_OPTIONS_VERSION = "1"
21
+ GIT_CHECKOUT_OPTIONS_INIT = "{ 1 }"
22
+ GIT_CHECKOUT_OPTIONS_VERSION = "1"
23
+ GIT_CHERRYPICK_OPTIONS_INIT = "{ 1 , 0 , { 1 , GIT_MERGE_FIND_RENAMES } , { 1 } }"
24
+ GIT_CHERRYPICK_OPTIONS_VERSION = "1"
25
+ GIT_CLONE_OPTIONS_INIT = "{ 1 , { 1 , GIT_CHECKOUT_SAFE } , { 1 , { 1 } , GIT_FETCH_PRUNE_UNSPECIFIED , 1 , GIT_REMOTE_DOWNLOAD_TAGS_UNSPECIFIED , { 1 } } }"
26
+ GIT_CLONE_OPTIONS_VERSION = "1"
27
+ GIT_DEFAULT_PORT = "\"9418\""
28
+ GIT_DESCRIBE_DEFAULT_ABBREVIATED_SIZE = "7"
29
+ GIT_DESCRIBE_DEFAULT_MAX_CANDIDATES_TAGS = "10"
30
+ GIT_DESCRIBE_FORMAT_OPTIONS_INIT = "{ 1 , 7 , }"
31
+ GIT_DESCRIBE_FORMAT_OPTIONS_VERSION = "1"
32
+ GIT_DESCRIBE_OPTIONS_INIT = "{ 1 , 10 , }"
33
+ GIT_DESCRIBE_OPTIONS_VERSION = "1"
34
+ GIT_DIFF_FIND_OPTIONS_INIT = "{ 1 }"
35
+ GIT_DIFF_FIND_OPTIONS_VERSION = "1"
36
+ GIT_DIFF_FORMAT_EMAIL_OPTIONS_INIT = "{ 1 , 0 , 1 , 1 , ( ( void * ) 0 ) , ( ( void * ) 0 ) , ( ( void * ) 0 ) , ( ( void * ) 0 ) }"
37
+ GIT_DIFF_FORMAT_EMAIL_OPTIONS_VERSION = "1"
38
+ GIT_DIFF_HUNK_HEADER_SIZE = "128"
39
+ GIT_DIFF_OPTIONS_INIT = "{ 1 , 0 , GIT_SUBMODULE_IGNORE_UNSPECIFIED , { ( ( void * ) 0 ) , 0 } , ( ( void * ) 0 ) , ( ( void * ) 0 ) , ( ( void * ) 0 ) , 3 }"
40
+ GIT_DIFF_OPTIONS_VERSION = "1"
41
+ GIT_DIFF_PATCHID_OPTIONS_INIT = "{ 1 }"
42
+ GIT_DIFF_PATCHID_OPTIONS_VERSION = "1"
43
+ GIT_FETCH_OPTIONS_INIT = "{ 1 , { 1 } , GIT_FETCH_PRUNE_UNSPECIFIED , 1 , GIT_REMOTE_DOWNLOAD_TAGS_UNSPECIFIED , { 1 } }"
44
+ GIT_FETCH_OPTIONS_VERSION = "1"
45
+ GIT_IDXENTRY_NAMEMASK = "( 0x0fff )"
46
+ GIT_IDXENTRY_STAGEMASK = "( 0x3000 )"
47
+ GIT_IDXENTRY_STAGESHIFT = "12"
48
+ GIT_MERGE_CONFLICT_MARKER_SIZE = "7"
49
+ GIT_MERGE_FILE_INPUT_INIT = "{ 1 }"
50
+ GIT_MERGE_FILE_INPUT_VERSION = "1"
51
+ GIT_MERGE_FILE_OPTIONS_INIT = "{ 1 }"
52
+ GIT_MERGE_FILE_OPTIONS_VERSION = "1"
53
+ GIT_MERGE_OPTIONS_INIT = "{ 1 , GIT_MERGE_FIND_RENAMES }"
54
+ GIT_MERGE_OPTIONS_VERSION = "1"
55
+ GIT_OID_HEXSZ = "( 20 * 2 )"
56
+ GIT_OID_HEX_ZERO = "\"0000000000000000000000000000000000000000\""
57
+ GIT_OID_MINPREFIXLEN = "4"
58
+ GIT_OID_RAWSZ = "20"
59
+ GIT_PATH_LIST_SEPARATOR = "':'"
60
+ GIT_PATH_MAX = "4096"
61
+ GIT_PROXY_OPTIONS_INIT = "{ 1 }"
62
+ GIT_PROXY_OPTIONS_VERSION = "1"
63
+ GIT_PUSH_OPTIONS_INIT = "{ 1 , 0 , { 1 } , { 1 } }"
64
+ GIT_PUSH_OPTIONS_VERSION = "1"
65
+ GIT_REBASE_NO_OPERATION = "( 18446744073709551615UL )"
66
+ GIT_REBASE_OPTIONS_INIT = "{ 1 , 0 , 0 , ( ( void * ) 0 ) , { 1 , GIT_MERGE_FIND_RENAMES } , { 1 } }"
67
+ GIT_REBASE_OPTIONS_VERSION = "1"
68
+ GIT_REMOTE_CALLBACKS_INIT = "{ 1 }"
69
+ GIT_REMOTE_CALLBACKS_VERSION = "1"
70
+ GIT_REPOSITORY_INIT_OPTIONS_INIT = "{ 1 }"
71
+ GIT_REPOSITORY_INIT_OPTIONS_VERSION = "1"
72
+ GIT_REVERT_OPTIONS_INIT = "{ 1 , 0 , { 1 , GIT_MERGE_FIND_RENAMES } , { 1 } }"
73
+ GIT_REVERT_OPTIONS_VERSION = "1"
74
+ GIT_STASH_APPLY_OPTIONS_INIT = "{ 1 , GIT_STASH_APPLY_DEFAULT , { 1 } }"
75
+ GIT_STASH_APPLY_OPTIONS_VERSION = "1"
76
+ GIT_STATUS_OPTIONS_INIT = "{ 1 }"
77
+ GIT_STATUS_OPTIONS_VERSION = "1"
78
+ GIT_STATUS_OPT_DEFAULTS = "( GIT_STATUS_OPT_INCLUDE_IGNORED | GIT_STATUS_OPT_INCLUDE_UNTRACKED | GIT_STATUS_OPT_RECURSE_UNTRACKED_DIRS )"
79
+ GIT_SUBMODULE_STATUS__INDEX_FLAGS = "0x0070u"
80
+ GIT_SUBMODULE_STATUS__IN_FLAGS = "0x000Fu"
81
+ GIT_SUBMODULE_STATUS__WD_FLAGS = "0x3F80u"
82
+ GIT_SUBMODULE_UPDATE_OPTIONS_INIT = "{ 1 , { 1 , GIT_CHECKOUT_SAFE } , { 1 , { 1 } , GIT_FETCH_PRUNE_UNSPECIFIED , 1 , GIT_REMOTE_DOWNLOAD_TAGS_UNSPECIFIED , { 1 } } , 1 }"
83
+ GIT_SUBMODULE_UPDATE_OPTIONS_VERSION = "1"
84
+ GIT_WORKTREE_ADD_OPTIONS_INIT = "{ 1 , 0 }"
85
+ GIT_WORKTREE_ADD_OPTIONS_VERSION = "1"
86
+ GIT_WORKTREE_PRUNE_OPTIONS_INIT = "{ 1 , 0 }"
87
+ GIT_WORKTREE_PRUNE_OPTIONS_VERSION = "1"
88
+ LIBGIT2_SOVERSION = "27"
89
+ LIBGIT2_VERSION = "\"0.27.7\""
90
+ LIBGIT2_VER_MAJOR = "0"
91
+ LIBGIT2_VER_MINOR = "27"
92
+ LIBGIT2_VER_PATCH = "0"
93
+ LIBGIT2_VER_REVISION = "7"
94
+
95
+ attach_function :git_libgit2_version, [:pointer, :pointer, :pointer], :void
96
+
97
+ enum :git_feature_t, [:GIT_FEATURE_THREADS, 1, :GIT_FEATURE_HTTPS, 2, :GIT_FEATURE_SSH, 4, :GIT_FEATURE_NSEC, 8]
98
+
99
+
100
+ attach_function :git_libgit2_features, [], :int32
101
+
102
+ enum :git_libgit2_opt_t, [:GIT_OPT_GET_MWINDOW_SIZE, 0, :GIT_OPT_SET_MWINDOW_SIZE, 1, :GIT_OPT_GET_MWINDOW_MAPPED_LIMIT, 2, :GIT_OPT_SET_MWINDOW_MAPPED_LIMIT, 3, :GIT_OPT_GET_SEARCH_PATH, 4, :GIT_OPT_SET_SEARCH_PATH, 5, :GIT_OPT_SET_CACHE_OBJECT_LIMIT, 6, :GIT_OPT_SET_CACHE_MAX_SIZE, 7, :GIT_OPT_ENABLE_CACHING, 8, :GIT_OPT_GET_CACHED_MEMORY, 9, :GIT_OPT_GET_TEMPLATE_PATH, 10, :GIT_OPT_SET_TEMPLATE_PATH, 11, :GIT_OPT_SET_SSL_CERT_LOCATIONS, 12, :GIT_OPT_SET_USER_AGENT, 13, :GIT_OPT_ENABLE_STRICT_OBJECT_CREATION, 14, :GIT_OPT_ENABLE_STRICT_SYMBOLIC_REF_CREATION, 15, :GIT_OPT_SET_SSL_CIPHERS, 16, :GIT_OPT_GET_USER_AGENT, 17, :GIT_OPT_ENABLE_OFS_DELTA, 18, :GIT_OPT_ENABLE_FSYNC_GITDIR, 19, :GIT_OPT_GET_WINDOWS_SHAREMODE, 20, :GIT_OPT_SET_WINDOWS_SHAREMODE, 21, :GIT_OPT_ENABLE_STRICT_HASH_VERIFICATION, 22]
103
+
104
+
105
+ attach_function :git_libgit2_opts, [:int32], :int32
106
+
107
+ typedef :int64, :git_off_t
108
+
109
+ typedef :int64, :git_time_t
110
+
111
+ enum :git_otype, [:GIT_OBJ_ANY, -2, :GIT_OBJ_BAD, -1, :GIT_OBJ__EXT1, 0, :GIT_OBJ_COMMIT, 1, :GIT_OBJ_TREE, 2, :GIT_OBJ_BLOB, 3, :GIT_OBJ_TAG, 4, :GIT_OBJ__EXT2, 5, :GIT_OBJ_OFS_DELTA, 6, :GIT_OBJ_REF_DELTA, 7]
112
+
113
+
114
+ class GitOdb < FFI::Struct
115
+ end
116
+
117
+
118
+ class GitOdbBackend < FFI::Struct
119
+ end
120
+
121
+
122
+ class GitOdbObject < FFI::Struct
123
+ end
124
+
125
+
126
+ class GitOdbStream < FFI::Struct
127
+ end
128
+
129
+
130
+ class GitOdbWritepack < FFI::Struct
131
+ end
132
+
133
+
134
+ class GitRefdb < FFI::Struct
135
+ end
136
+
137
+
138
+ class GitRefdbBackend < FFI::Struct
139
+ end
140
+
141
+
142
+ class GitRepository < FFI::Struct
143
+ end
144
+
145
+
146
+ class GitWorktree < FFI::Struct
147
+ end
148
+
149
+
150
+ class GitObject < FFI::Struct
151
+ end
152
+
153
+
154
+ class GitRevwalk < FFI::Struct
155
+ end
156
+
157
+
158
+ class GitTag < FFI::Struct
159
+ end
160
+
161
+
162
+ class GitBlob < FFI::Struct
163
+ end
164
+
165
+
166
+ class GitCommit < FFI::Struct
167
+ end
168
+
169
+
170
+ class GitTreeEntry < FFI::Struct
171
+ end
172
+
173
+
174
+ class GitTree < FFI::Struct
175
+ end
176
+
177
+
178
+ class GitTreebuilder < FFI::Struct
179
+ end
180
+
181
+
182
+ class GitIndex < FFI::Struct
183
+ end
184
+
185
+
186
+ class GitIndexConflictIterator < FFI::Struct
187
+ end
188
+
189
+
190
+ class GitConfig < FFI::Struct
191
+ end
192
+
193
+
194
+ class GitConfigBackend < FFI::Struct
195
+ end
196
+
197
+
198
+ class GitReflogEntry < FFI::Struct
199
+ end
200
+
201
+
202
+ class GitReflog < FFI::Struct
203
+ end
204
+
205
+
206
+ class GitNote < FFI::Struct
207
+ end
208
+
209
+
210
+ class GitPackbuilder < FFI::Struct
211
+ end
212
+
213
+
214
+ class GitTime < FFI::Struct
215
+ layout :time, :git_time_t, :offset, :int32, :sign, :int8
216
+ end
217
+
218
+
219
+ class GitSignature < FFI::Struct
220
+ layout :name, :pointer, :email, :pointer, :when, GitTime.by_value
221
+ end
222
+
223
+
224
+ class GitReference < FFI::Struct
225
+ end
226
+
227
+
228
+ class GitReferenceIterator < FFI::Struct
229
+ end
230
+
231
+
232
+ class GitTransaction < FFI::Struct
233
+ end
234
+
235
+
236
+ class GitAnnotatedCommit < FFI::Struct
237
+ end
238
+
239
+
240
+ class GitMergeResult < FFI::Struct
241
+ end
242
+
243
+
244
+ class GitStatusList < FFI::Struct
245
+ end
246
+
247
+
248
+ class GitRebase < FFI::Struct
249
+ end
250
+
251
+
252
+ enum :git_ref_t, [:GIT_REF_INVALID, 0, :GIT_REF_OID, 1, :GIT_REF_SYMBOLIC, 2, :GIT_REF_LISTALL, 3]
253
+
254
+
255
+ enum :git_branch_t, [:GIT_BRANCH_LOCAL, 1, :GIT_BRANCH_REMOTE, 2, :GIT_BRANCH_ALL, 3]
256
+
257
+
258
+ enum :git_filemode_t, [:GIT_FILEMODE_UNREADABLE, 0, :GIT_FILEMODE_TREE, 16384, :GIT_FILEMODE_BLOB, 33188, :GIT_FILEMODE_BLOB_EXECUTABLE, 33261, :GIT_FILEMODE_LINK, 40960, :GIT_FILEMODE_COMMIT, 57344]
259
+
260
+
261
+ class GitRefspec < FFI::Struct
262
+ end
263
+
264
+
265
+ class GitRemote < FFI::Struct
266
+ end
267
+
268
+
269
+ class GitTransport < FFI::Struct
270
+ end
271
+
272
+
273
+ class GitPush < FFI::Struct
274
+ end
275
+
276
+
277
+ class GitRemoteHead < FFI::Struct
278
+ end
279
+
280
+
281
+ class GitRemoteCallback < FFI::Struct
282
+ end
283
+
284
+
285
+ class GitTransferProgress < FFI::Struct
286
+ layout :total_objects, :uint32, :indexed_objects, :uint32, :received_objects, :uint32, :local_objects, :uint32, :total_deltas, :uint32, :indexed_deltas, :uint32, :received_bytes, :uint64
287
+ end
288
+
289
+
290
+ callback :git_transfer_progress_cb, [:pointer, :pointer], :int32
291
+
292
+ callback :git_transport_message_cb, [:pointer, :int32, :pointer], :int32
293
+
294
+ enum :git_cert_t, [:GIT_CERT_NONE, 0, :GIT_CERT_X509, 1, :GIT_CERT_HOSTKEY_LIBSSH2, 2, :GIT_CERT_STRARRAY, 3]
295
+
296
+
297
+ class GitCert < FFI::Struct
298
+ layout :cert_type, :git_cert_t
299
+ end
300
+
301
+
302
+ callback :git_transport_certificate_check_cb, [GitCert.by_ref, :int32, :pointer, :pointer], :int32
303
+
304
+ class GitSubmodule < FFI::Struct
305
+ end
306
+
307
+
308
+ enum :git_submodule_update_t, [:GIT_SUBMODULE_UPDATE_CHECKOUT, 1, :GIT_SUBMODULE_UPDATE_REBASE, 2, :GIT_SUBMODULE_UPDATE_MERGE, 3, :GIT_SUBMODULE_UPDATE_NONE, 4, :GIT_SUBMODULE_UPDATE_DEFAULT, 0]
309
+
310
+
311
+ enum :git_submodule_ignore_t, [:GIT_SUBMODULE_IGNORE_UNSPECIFIED, -1, :GIT_SUBMODULE_IGNORE_NONE, 1, :GIT_SUBMODULE_IGNORE_UNTRACKED, 2, :GIT_SUBMODULE_IGNORE_DIRTY, 3, :GIT_SUBMODULE_IGNORE_ALL, 4]
312
+
313
+
314
+ enum :git_submodule_recurse_t, [:GIT_SUBMODULE_RECURSE_NO, 0, :GIT_SUBMODULE_RECURSE_YES, 1, :GIT_SUBMODULE_RECURSE_ONDEMAND, 2]
315
+
316
+
317
+ class GitWritestream < FFI::Struct
318
+ end
319
+
320
+
321
+ class GitWritestream < FFI::Struct
322
+ layout :write, callback([GitWritestream.by_ref, :pointer, :uint64], :int32), :close, callback([GitWritestream.by_ref], :int32), :free, callback([GitWritestream.by_ref], :void)
323
+ end
324
+
325
+ class GitOid < FFI::Struct
326
+ layout :id, [:uint8, 20]
327
+ end
328
+
329
+
330
+ attach_function :git_oid_fromstr, [GitOid.by_ref, :pointer], :int32
331
+
332
+ attach_function :git_oid_fromstrp, [GitOid.by_ref, :pointer], :int32
333
+
334
+ attach_function :git_oid_fromstrn, [GitOid.by_ref, :pointer, :uint64], :int32
335
+
336
+ attach_function :git_oid_fromraw, [GitOid.by_ref, :pointer], :void
337
+
338
+ attach_function :git_oid_fmt, [:pointer, :pointer], :void
339
+
340
+ attach_function :git_oid_nfmt, [:pointer, :uint64, :pointer], :void
341
+
342
+ attach_function :git_oid_pathfmt, [:pointer, :pointer], :void
343
+
344
+ attach_function :git_oid_tostr_s, [:pointer], :pointer
345
+
346
+ attach_function :git_oid_tostr, [:pointer, :uint64, :pointer], :pointer
347
+
348
+ attach_function :git_oid_cpy, [GitOid.by_ref, :pointer], :void
349
+
350
+ attach_function :git_oid_cmp, [:pointer, :pointer], :int32
351
+
352
+ attach_function :git_oid_equal, [:pointer, :pointer], :int32
353
+
354
+ attach_function :git_oid_ncmp, [:pointer, :pointer, :uint64], :int32
355
+
356
+ attach_function :git_oid_streq, [:pointer, :pointer], :int32
357
+
358
+ attach_function :git_oid_strcmp, [:pointer, :pointer], :int32
359
+
360
+ attach_function :git_oid_iszero, [:pointer], :int32
361
+
362
+ class GitOidShorten < FFI::Struct
363
+ end
364
+
365
+
366
+ attach_function :git_oid_shorten_new, [:uint64], GitOidShorten.by_ref
367
+
368
+ attach_function :git_oid_shorten_add, [GitOidShorten.by_ref, :pointer], :int32
369
+
370
+ attach_function :git_oid_shorten_free, [GitOidShorten.by_ref], :void
371
+
372
+ class GitBuf < FFI::Struct
373
+ layout :ptr, :pointer, :asize, :uint64, :size, :uint64
374
+ end
375
+
376
+
377
+ attach_function :git_buf_free, [GitBuf.by_ref], :void
378
+
379
+ attach_function :git_buf_grow, [GitBuf.by_ref, :uint64], :int32
380
+
381
+ attach_function :git_buf_set, [GitBuf.by_ref, :pointer, :uint64], :int32
382
+
383
+ attach_function :git_buf_is_binary, [:pointer], :int32
384
+
385
+ attach_function :git_buf_contains_nul, [:pointer], :int32
386
+
387
+ attach_function :git_repository_open, [:pointer, :pointer], :int32
388
+
389
+ attach_function :git_repository_open_from_worktree, [:pointer, GitWorktree.by_ref], :int32
390
+
391
+ attach_function :git_repository_wrap_odb, [:pointer, GitOdb.by_ref], :int32
392
+
393
+ attach_function :git_repository_discover, [GitBuf.by_ref, :pointer, :int32, :pointer], :int32
394
+
395
+ enum :git_repository_open_flag_t, [:GIT_REPOSITORY_OPEN_NO_SEARCH, 1, :GIT_REPOSITORY_OPEN_CROSS_FS, 2, :GIT_REPOSITORY_OPEN_BARE, 4, :GIT_REPOSITORY_OPEN_NO_DOTGIT, 8, :GIT_REPOSITORY_OPEN_FROM_ENV, 16]
396
+
397
+
398
+ attach_function :git_repository_open_ext, [:pointer, :pointer, :uint32, :pointer], :int32
399
+
400
+ attach_function :git_repository_open_bare, [:pointer, :pointer], :int32
401
+
402
+ attach_function :git_repository_free, [GitRepository.by_ref], :void
403
+
404
+ attach_function :git_repository_init, [:pointer, :pointer, :uint32], :int32
405
+
406
+ enum :git_repository_init_flag_t, [:GIT_REPOSITORY_INIT_BARE, 1, :GIT_REPOSITORY_INIT_NO_REINIT, 2, :GIT_REPOSITORY_INIT_NO_DOTGIT_DIR, 4, :GIT_REPOSITORY_INIT_MKDIR, 8, :GIT_REPOSITORY_INIT_MKPATH, 16, :GIT_REPOSITORY_INIT_EXTERNAL_TEMPLATE, 32, :GIT_REPOSITORY_INIT_RELATIVE_GITLINK, 64]
407
+
408
+
409
+ enum :git_repository_init_mode_t, [:GIT_REPOSITORY_INIT_SHARED_UMASK, 0, :GIT_REPOSITORY_INIT_SHARED_GROUP, 1533, :GIT_REPOSITORY_INIT_SHARED_ALL, 1535]
410
+
411
+
412
+ class GitRepositoryInitOption < FFI::Struct
413
+ layout :version, :uint32, :flags, :uint32, :mode, :uint32, :workdir_path, :pointer, :description, :pointer, :template_path, :pointer, :initial_head, :pointer, :origin_url, :pointer
414
+ end
415
+
416
+
417
+ attach_function :git_repository_init_init_options, [GitRepositoryInitOption.by_ref, :uint32], :int32
418
+
419
+ attach_function :git_repository_init_ext, [:pointer, :pointer, GitRepositoryInitOption.by_ref], :int32
420
+
421
+ attach_function :git_repository_head, [:pointer, GitRepository.by_ref], :int32
422
+
423
+ attach_function :git_repository_head_for_worktree, [:pointer, GitRepository.by_ref, :pointer], :int32
424
+
425
+ attach_function :git_repository_head_detached, [GitRepository.by_ref], :int32
426
+
427
+ attach_function :git_repository_head_detached_for_worktree, [GitRepository.by_ref, :pointer], :int32
428
+
429
+ attach_function :git_repository_head_unborn, [GitRepository.by_ref], :int32
430
+
431
+ attach_function :git_repository_is_empty, [GitRepository.by_ref], :int32
432
+
433
+ enum :git_repository_item_t, [:GIT_REPOSITORY_ITEM_GITDIR, 0, :GIT_REPOSITORY_ITEM_WORKDIR, 1, :GIT_REPOSITORY_ITEM_COMMONDIR, 2, :GIT_REPOSITORY_ITEM_INDEX, 3, :GIT_REPOSITORY_ITEM_OBJECTS, 4, :GIT_REPOSITORY_ITEM_REFS, 5, :GIT_REPOSITORY_ITEM_PACKED_REFS, 6, :GIT_REPOSITORY_ITEM_REMOTES, 7, :GIT_REPOSITORY_ITEM_CONFIG, 8, :GIT_REPOSITORY_ITEM_INFO, 9, :GIT_REPOSITORY_ITEM_HOOKS, 10, :GIT_REPOSITORY_ITEM_LOGS, 11, :GIT_REPOSITORY_ITEM_MODULES, 12, :GIT_REPOSITORY_ITEM_WORKTREES, 13]
434
+
435
+
436
+ attach_function :git_repository_item_path, [GitBuf.by_ref, :pointer, :git_repository_item_t], :int32
437
+
438
+ attach_function :git_repository_path, [:pointer], :pointer
439
+
440
+ attach_function :git_repository_workdir, [:pointer], :pointer
441
+
442
+ attach_function :git_repository_commondir, [:pointer], :pointer
443
+
444
+ attach_function :git_repository_set_workdir, [GitRepository.by_ref, :pointer, :int32], :int32
445
+
446
+ attach_function :git_repository_is_bare, [:pointer], :int32
447
+
448
+ attach_function :git_repository_is_worktree, [:pointer], :int32
449
+
450
+ attach_function :git_repository_config, [:pointer, GitRepository.by_ref], :int32
451
+
452
+ attach_function :git_repository_config_snapshot, [:pointer, GitRepository.by_ref], :int32
453
+
454
+ attach_function :git_repository_odb, [:pointer, GitRepository.by_ref], :int32
455
+
456
+ attach_function :git_repository_refdb, [:pointer, GitRepository.by_ref], :int32
457
+
458
+ attach_function :git_repository_index, [:pointer, GitRepository.by_ref], :int32
459
+
460
+ attach_function :git_repository_message, [GitBuf.by_ref, GitRepository.by_ref], :int32
461
+
462
+ attach_function :git_repository_message_remove, [GitRepository.by_ref], :int32
463
+
464
+ attach_function :git_repository_state_cleanup, [GitRepository.by_ref], :int32
465
+
466
+ callback :git_repository_fetchhead_foreach_cb, [:pointer, :pointer, :pointer, :uint32, :pointer], :int32
467
+
468
+ attach_function :git_repository_fetchhead_foreach, [GitRepository.by_ref, :git_repository_fetchhead_foreach_cb, :pointer], :int32
469
+
470
+ callback :git_repository_mergehead_foreach_cb, [:pointer, :pointer], :int32
471
+
472
+ attach_function :git_repository_mergehead_foreach, [GitRepository.by_ref, :git_repository_mergehead_foreach_cb, :pointer], :int32
473
+
474
+ attach_function :git_repository_hashfile, [GitOid.by_ref, GitRepository.by_ref, :pointer, :git_otype, :pointer], :int32
475
+
476
+ attach_function :git_repository_set_head, [GitRepository.by_ref, :pointer], :int32
477
+
478
+ attach_function :git_repository_set_head_detached, [GitRepository.by_ref, :pointer], :int32
479
+
480
+ attach_function :git_repository_set_head_detached_from_annotated, [GitRepository.by_ref, :pointer], :int32
481
+
482
+ attach_function :git_repository_detach_head, [GitRepository.by_ref], :int32
483
+
484
+ enum :git_repository_state_t, [:GIT_REPOSITORY_STATE_NONE, 0, :GIT_REPOSITORY_STATE_MERGE, 1, :GIT_REPOSITORY_STATE_REVERT, 2, :GIT_REPOSITORY_STATE_REVERT_SEQUENCE, 3, :GIT_REPOSITORY_STATE_CHERRYPICK, 4, :GIT_REPOSITORY_STATE_CHERRYPICK_SEQUENCE, 5, :GIT_REPOSITORY_STATE_BISECT, 6, :GIT_REPOSITORY_STATE_REBASE, 7, :GIT_REPOSITORY_STATE_REBASE_INTERACTIVE, 8, :GIT_REPOSITORY_STATE_REBASE_MERGE, 9, :GIT_REPOSITORY_STATE_APPLY_MAILBOX, 10, :GIT_REPOSITORY_STATE_APPLY_MAILBOX_OR_REBASE, 11]
485
+
486
+
487
+ attach_function :git_repository_state, [GitRepository.by_ref], :int32
488
+
489
+ attach_function :git_repository_set_namespace, [GitRepository.by_ref, :pointer], :int32
490
+
491
+ attach_function :git_repository_get_namespace, [GitRepository.by_ref], :pointer
492
+
493
+ attach_function :git_repository_is_shallow, [GitRepository.by_ref], :int32
494
+
495
+ attach_function :git_repository_ident, [:pointer, :pointer, :pointer], :int32
496
+
497
+ attach_function :git_repository_set_ident, [GitRepository.by_ref, :pointer, :pointer], :int32
498
+
499
+ attach_function :git_annotated_commit_from_ref, [:pointer, GitRepository.by_ref, :pointer], :int32
500
+
501
+ attach_function :git_annotated_commit_from_fetchhead, [:pointer, GitRepository.by_ref, :pointer, :pointer, :pointer], :int32
502
+
503
+ attach_function :git_annotated_commit_lookup, [:pointer, GitRepository.by_ref, :pointer], :int32
504
+
505
+ attach_function :git_annotated_commit_from_revspec, [:pointer, GitRepository.by_ref, :pointer], :int32
506
+
507
+ attach_function :git_annotated_commit_id, [:pointer], :pointer
508
+
509
+ attach_function :git_annotated_commit_free, [GitAnnotatedCommit.by_ref], :void
510
+
511
+ enum :git_attr_t, [:GIT_ATTR_UNSPECIFIED_T, 0, :GIT_ATTR_TRUE_T, 1, :GIT_ATTR_FALSE_T, 2, :GIT_ATTR_VALUE_T, 3]
512
+
513
+
514
+ attach_function :git_attr_value, [:pointer], :git_attr_t
515
+
516
+ attach_function :git_attr_get, [:pointer, GitRepository.by_ref, :uint32, :pointer, :pointer], :int32
517
+
518
+ attach_function :git_attr_get_many, [:pointer, GitRepository.by_ref, :uint32, :pointer, :uint64, :pointer], :int32
519
+
520
+ callback :git_attr_foreach_cb, [:pointer, :pointer, :pointer], :int32
521
+
522
+ attach_function :git_attr_foreach, [GitRepository.by_ref, :uint32, :pointer, :git_attr_foreach_cb, :pointer], :int32
523
+
524
+ attach_function :git_attr_cache_flush, [GitRepository.by_ref], :void
525
+
526
+ attach_function :git_attr_add_macro, [GitRepository.by_ref, :pointer, :pointer], :int32
527
+
528
+ attach_function :git_object_lookup, [:pointer, GitRepository.by_ref, :pointer, :git_otype], :int32
529
+
530
+ attach_function :git_object_lookup_prefix, [:pointer, GitRepository.by_ref, :pointer, :uint64, :git_otype], :int32
531
+
532
+ attach_function :git_object_lookup_bypath, [:pointer, :pointer, :pointer, :git_otype], :int32
533
+
534
+ attach_function :git_object_id, [:pointer], :pointer
535
+
536
+ attach_function :git_object_short_id, [GitBuf.by_ref, :pointer], :int32
537
+
538
+ attach_function :git_object_type, [:pointer], :git_otype
539
+
540
+ attach_function :git_object_owner, [:pointer], GitRepository.by_ref
541
+
542
+ attach_function :git_object_free, [GitObject.by_ref], :void
543
+
544
+ attach_function :git_object_type2string, [:git_otype], :pointer
545
+
546
+ attach_function :git_object_string2type, [:pointer], :git_otype
547
+
548
+ attach_function :git_object_typeisloose, [:git_otype], :int32
549
+
550
+ attach_function :git_object__size, [:git_otype], :uint64
551
+
552
+ attach_function :git_object_peel, [:pointer, :pointer, :git_otype], :int32
553
+
554
+ attach_function :git_object_dup, [:pointer, GitObject.by_ref], :int32
555
+
556
+ attach_function :git_blob_lookup, [:pointer, GitRepository.by_ref, :pointer], :int32
557
+
558
+ attach_function :git_blob_lookup_prefix, [:pointer, GitRepository.by_ref, :pointer, :uint64], :int32
559
+
560
+ attach_function :git_blob_free, [GitBlob.by_ref], :void
561
+
562
+ attach_function :git_blob_id, [:pointer], :pointer
563
+
564
+ attach_function :git_blob_owner, [:pointer], GitRepository.by_ref
565
+
566
+ attach_function :git_blob_rawcontent, [:pointer], :pointer
567
+
568
+ attach_function :git_blob_rawsize, [:pointer], :git_off_t
569
+
570
+ attach_function :git_blob_filtered_content, [GitBuf.by_ref, GitBlob.by_ref, :pointer, :int32], :int32
571
+
572
+ attach_function :git_blob_create_fromworkdir, [GitOid.by_ref, GitRepository.by_ref, :pointer], :int32
573
+
574
+ attach_function :git_blob_create_fromdisk, [GitOid.by_ref, GitRepository.by_ref, :pointer], :int32
575
+
576
+ attach_function :git_blob_create_fromstream, [:pointer, GitRepository.by_ref, :pointer], :int32
577
+
578
+ attach_function :git_blob_create_fromstream_commit, [GitOid.by_ref, GitWritestream.by_ref], :int32
579
+
580
+ attach_function :git_blob_create_frombuffer, [GitOid.by_ref, GitRepository.by_ref, :pointer, :uint64], :int32
581
+
582
+ attach_function :git_blob_is_binary, [:pointer], :int32
583
+
584
+ attach_function :git_blob_dup, [:pointer, GitBlob.by_ref], :int32
585
+
586
+ enum :git_blame_flag_t, [:GIT_BLAME_NORMAL, 0, :GIT_BLAME_TRACK_COPIES_SAME_FILE, 1, :GIT_BLAME_TRACK_COPIES_SAME_COMMIT_MOVES, 2, :GIT_BLAME_TRACK_COPIES_SAME_COMMIT_COPIES, 4, :GIT_BLAME_TRACK_COPIES_ANY_COMMIT_COPIES, 8, :GIT_BLAME_FIRST_PARENT, 16]
587
+
588
+
589
+ class GitBlameOption < FFI::Struct
590
+ layout :version, :uint32, :flags, :uint32, :min_match_characters, :uint16, :newest_commit, GitOid.by_value, :oldest_commit, GitOid.by_value, :min_line, :uint64, :max_line, :uint64
591
+ end
592
+
593
+
594
+ attach_function :git_blame_init_options, [GitBlameOption.by_ref, :uint32], :int32
595
+
596
+ class GitBlameHunk < FFI::Struct
597
+ layout :lines_in_hunk, :uint64, :final_commit_id, GitOid.by_value, :final_start_line_number, :uint64, :final_signature, GitSignature.by_ref, :orig_commit_id, GitOid.by_value, :orig_path, :pointer, :orig_start_line_number, :uint64, :orig_signature, GitSignature.by_ref, :boundary, :int8
598
+ end
599
+
600
+
601
+ class GitBlame < FFI::Struct
602
+ end
603
+
604
+
605
+ attach_function :git_blame_get_hunk_count, [GitBlame.by_ref], :uint32
606
+
607
+ attach_function :git_blame_get_hunk_byindex, [GitBlame.by_ref, :uint32], :pointer
608
+
609
+ attach_function :git_blame_get_hunk_byline, [GitBlame.by_ref, :uint64], :pointer
610
+
611
+ attach_function :git_blame_file, [:pointer, GitRepository.by_ref, :pointer, GitBlameOption.by_ref], :int32
612
+
613
+ attach_function :git_blame_buffer, [:pointer, GitBlame.by_ref, :pointer, :uint64], :int32
614
+
615
+ attach_function :git_blame_free, [GitBlame.by_ref], :void
616
+
617
+ attach_function :git_branch_create, [:pointer, GitRepository.by_ref, :pointer, :pointer, :int32], :int32
618
+
619
+ attach_function :git_branch_create_from_annotated, [:pointer, GitRepository.by_ref, :pointer, :pointer, :int32], :int32
620
+
621
+ attach_function :git_branch_delete, [GitReference.by_ref], :int32
622
+
623
+ class GitBranchIterator < FFI::Struct
624
+ end
625
+
626
+
627
+ attach_function :git_branch_iterator_new, [:pointer, GitRepository.by_ref, :git_branch_t], :int32
628
+
629
+ attach_function :git_branch_next, [:pointer, :pointer, GitBranchIterator.by_ref], :int32
630
+
631
+ attach_function :git_branch_iterator_free, [GitBranchIterator.by_ref], :void
632
+
633
+ attach_function :git_branch_move, [:pointer, GitReference.by_ref, :pointer, :int32], :int32
634
+
635
+ attach_function :git_branch_lookup, [:pointer, GitRepository.by_ref, :pointer, :git_branch_t], :int32
636
+
637
+ attach_function :git_branch_name, [:pointer, :pointer], :int32
638
+
639
+ attach_function :git_branch_upstream, [:pointer, :pointer], :int32
640
+
641
+ attach_function :git_branch_set_upstream, [GitReference.by_ref, :pointer], :int32
642
+
643
+ attach_function :git_branch_upstream_name, [GitBuf.by_ref, GitRepository.by_ref, :pointer], :int32
644
+
645
+ attach_function :git_branch_is_head, [:pointer], :int32
646
+
647
+ attach_function :git_branch_is_checked_out, [:pointer], :int32
648
+
649
+ attach_function :git_branch_remote_name, [GitBuf.by_ref, GitRepository.by_ref, :pointer], :int32
650
+
651
+ attach_function :git_branch_upstream_remote, [GitBuf.by_ref, GitRepository.by_ref, :pointer], :int32
652
+
653
+ attach_function :git_tree_lookup, [:pointer, GitRepository.by_ref, :pointer], :int32
654
+
655
+ attach_function :git_tree_lookup_prefix, [:pointer, GitRepository.by_ref, :pointer, :uint64], :int32
656
+
657
+ attach_function :git_tree_free, [GitTree.by_ref], :void
658
+
659
+ attach_function :git_tree_id, [:pointer], :pointer
660
+
661
+ attach_function :git_tree_owner, [:pointer], GitRepository.by_ref
662
+
663
+ attach_function :git_tree_entrycount, [:pointer], :uint64
664
+
665
+ attach_function :git_tree_entry_byname, [:pointer, :pointer], :pointer
666
+
667
+ attach_function :git_tree_entry_byindex, [:pointer, :uint64], :pointer
668
+
669
+ attach_function :git_tree_entry_byid, [:pointer, :pointer], :pointer
670
+
671
+ attach_function :git_tree_entry_bypath, [:pointer, :pointer, :pointer], :int32
672
+
673
+ attach_function :git_tree_entry_dup, [:pointer, :pointer], :int32
674
+
675
+ attach_function :git_tree_entry_free, [GitTreeEntry.by_ref], :void
676
+
677
+ attach_function :git_tree_entry_name, [:pointer], :pointer
678
+
679
+ attach_function :git_tree_entry_id, [:pointer], :pointer
680
+
681
+ attach_function :git_tree_entry_type, [:pointer], :git_otype
682
+
683
+ attach_function :git_tree_entry_filemode, [:pointer], :git_filemode_t
684
+
685
+ attach_function :git_tree_entry_filemode_raw, [:pointer], :git_filemode_t
686
+
687
+ attach_function :git_tree_entry_cmp, [:pointer, :pointer], :int32
688
+
689
+ attach_function :git_tree_entry_to_object, [:pointer, GitRepository.by_ref, :pointer], :int32
690
+
691
+ attach_function :git_treebuilder_new, [:pointer, GitRepository.by_ref, :pointer], :int32
692
+
693
+ attach_function :git_treebuilder_clear, [GitTreebuilder.by_ref], :void
694
+
695
+ attach_function :git_treebuilder_entrycount, [GitTreebuilder.by_ref], :uint32
696
+
697
+ attach_function :git_treebuilder_free, [GitTreebuilder.by_ref], :void
698
+
699
+ attach_function :git_treebuilder_get, [GitTreebuilder.by_ref, :pointer], :pointer
700
+
701
+ attach_function :git_treebuilder_insert, [:pointer, GitTreebuilder.by_ref, :pointer, :pointer, :git_filemode_t], :int32
702
+
703
+ attach_function :git_treebuilder_remove, [GitTreebuilder.by_ref, :pointer], :int32
704
+
705
+ callback :git_treebuilder_filter_cb, [:pointer, :pointer], :int32
706
+
707
+ attach_function :git_treebuilder_filter, [GitTreebuilder.by_ref, :git_treebuilder_filter_cb, :pointer], :void
708
+
709
+ attach_function :git_treebuilder_write, [GitOid.by_ref, GitTreebuilder.by_ref], :int32
710
+
711
+ attach_function :git_treebuilder_write_with_buffer, [GitOid.by_ref, GitTreebuilder.by_ref, GitBuf.by_ref], :int32
712
+
713
+ callback :git_treewalk_cb, [:pointer, :pointer, :pointer], :int32
714
+
715
+ enum :git_treewalk_mode, [:GIT_TREEWALK_PRE, 0, :GIT_TREEWALK_POST, 1]
716
+
717
+
718
+ attach_function :git_tree_walk, [:pointer, :git_treewalk_mode, :git_treewalk_cb, :pointer], :int32
719
+
720
+ attach_function :git_tree_dup, [:pointer, GitTree.by_ref], :int32
721
+
722
+ enum :git_tree_update_t, [:GIT_TREE_UPDATE_UPSERT, 0, :GIT_TREE_UPDATE_REMOVE, 1]
723
+
724
+
725
+ class GitTreeUpdate < FFI::Struct
726
+ layout :action, :git_tree_update_t, :id, GitOid.by_value, :filemode, :git_filemode_t, :path, :pointer
727
+ end
728
+
729
+
730
+ attach_function :git_tree_create_updated, [GitOid.by_ref, GitRepository.by_ref, GitTree.by_ref, :uint64, :pointer], :int32
731
+
732
+ class GitStrarray < FFI::Struct
733
+ layout :strings, :pointer, :count, :uint64
734
+ end
735
+
736
+
737
+ attach_function :git_strarray_free, [GitStrarray.by_ref], :void
738
+
739
+ attach_function :git_strarray_copy, [GitStrarray.by_ref, :pointer], :int32
740
+
741
+ attach_function :git_reference_lookup, [:pointer, GitRepository.by_ref, :pointer], :int32
742
+
743
+ attach_function :git_reference_name_to_id, [GitOid.by_ref, GitRepository.by_ref, :pointer], :int32
744
+
745
+ attach_function :git_reference_dwim, [:pointer, GitRepository.by_ref, :pointer], :int32
746
+
747
+ attach_function :git_reference_symbolic_create_matching, [:pointer, GitRepository.by_ref, :pointer, :pointer, :int32, :pointer, :pointer], :int32
748
+
749
+ attach_function :git_reference_symbolic_create, [:pointer, GitRepository.by_ref, :pointer, :pointer, :int32, :pointer], :int32
750
+
751
+ attach_function :git_reference_create, [:pointer, GitRepository.by_ref, :pointer, :pointer, :int32, :pointer], :int32
752
+
753
+ attach_function :git_reference_create_matching, [:pointer, GitRepository.by_ref, :pointer, :pointer, :int32, :pointer, :pointer], :int32
754
+
755
+ attach_function :git_reference_target, [:pointer], :pointer
756
+
757
+ attach_function :git_reference_target_peel, [:pointer], :pointer
758
+
759
+ attach_function :git_reference_symbolic_target, [:pointer], :pointer
760
+
761
+ attach_function :git_reference_type, [:pointer], :git_ref_t
762
+
763
+ attach_function :git_reference_name, [:pointer], :pointer
764
+
765
+ attach_function :git_reference_resolve, [:pointer, :pointer], :int32
766
+
767
+ attach_function :git_reference_owner, [:pointer], GitRepository.by_ref
768
+
769
+ attach_function :git_reference_symbolic_set_target, [:pointer, GitReference.by_ref, :pointer, :pointer], :int32
770
+
771
+ attach_function :git_reference_set_target, [:pointer, GitReference.by_ref, :pointer, :pointer], :int32
772
+
773
+ attach_function :git_reference_rename, [:pointer, GitReference.by_ref, :pointer, :int32, :pointer], :int32
774
+
775
+ attach_function :git_reference_delete, [GitReference.by_ref], :int32
776
+
777
+ attach_function :git_reference_remove, [GitRepository.by_ref, :pointer], :int32
778
+
779
+ attach_function :git_reference_list, [GitStrarray.by_ref, GitRepository.by_ref], :int32
780
+
781
+ callback :git_reference_foreach_cb, [GitReference.by_ref, :pointer], :int32
782
+
783
+ callback :git_reference_foreach_name_cb, [:pointer, :pointer], :int32
784
+
785
+ attach_function :git_reference_foreach, [GitRepository.by_ref, :git_reference_foreach_cb, :pointer], :int32
786
+
787
+ attach_function :git_reference_foreach_name, [GitRepository.by_ref, :git_reference_foreach_name_cb, :pointer], :int32
788
+
789
+ attach_function :git_reference_dup, [:pointer, GitReference.by_ref], :int32
790
+
791
+ attach_function :git_reference_free, [GitReference.by_ref], :void
792
+
793
+ attach_function :git_reference_cmp, [:pointer, :pointer], :int32
794
+
795
+ attach_function :git_reference_iterator_new, [:pointer, GitRepository.by_ref], :int32
796
+
797
+ attach_function :git_reference_iterator_glob_new, [:pointer, GitRepository.by_ref, :pointer], :int32
798
+
799
+ attach_function :git_reference_next, [:pointer, GitReferenceIterator.by_ref], :int32
800
+
801
+ attach_function :git_reference_next_name, [:pointer, GitReferenceIterator.by_ref], :int32
802
+
803
+ attach_function :git_reference_iterator_free, [GitReferenceIterator.by_ref], :void
804
+
805
+ attach_function :git_reference_foreach_glob, [GitRepository.by_ref, :pointer, :git_reference_foreach_name_cb, :pointer], :int32
806
+
807
+ attach_function :git_reference_has_log, [GitRepository.by_ref, :pointer], :int32
808
+
809
+ attach_function :git_reference_ensure_log, [GitRepository.by_ref, :pointer], :int32
810
+
811
+ attach_function :git_reference_is_branch, [:pointer], :int32
812
+
813
+ attach_function :git_reference_is_remote, [:pointer], :int32
814
+
815
+ attach_function :git_reference_is_tag, [:pointer], :int32
816
+
817
+ attach_function :git_reference_is_note, [:pointer], :int32
818
+
819
+ enum :git_reference_normalize_t, [:GIT_REF_FORMAT_NORMAL, 0, :GIT_REF_FORMAT_ALLOW_ONELEVEL, 1, :GIT_REF_FORMAT_REFSPEC_PATTERN, 2, :GIT_REF_FORMAT_REFSPEC_SHORTHAND, 4]
820
+
821
+
822
+ attach_function :git_reference_normalize_name, [:pointer, :uint64, :pointer, :uint32], :int32
823
+
824
+ attach_function :git_reference_peel, [:pointer, GitReference.by_ref, :git_otype], :int32
825
+
826
+ attach_function :git_reference_is_valid_name, [:pointer], :int32
827
+
828
+ attach_function :git_reference_shorthand, [:pointer], :pointer
829
+
830
+ enum :git_diff_option_t, [:GIT_DIFF_NORMAL, 0, :GIT_DIFF_REVERSE, 1, :GIT_DIFF_INCLUDE_IGNORED, 2, :GIT_DIFF_RECURSE_IGNORED_DIRS, 4, :GIT_DIFF_INCLUDE_UNTRACKED, 8, :GIT_DIFF_RECURSE_UNTRACKED_DIRS, 16, :GIT_DIFF_INCLUDE_UNMODIFIED, 32, :GIT_DIFF_INCLUDE_TYPECHANGE, 64, :GIT_DIFF_INCLUDE_TYPECHANGE_TREES, 128, :GIT_DIFF_IGNORE_FILEMODE, 256, :GIT_DIFF_IGNORE_SUBMODULES, 512, :GIT_DIFF_IGNORE_CASE, 1024, :GIT_DIFF_INCLUDE_CASECHANGE, 2048, :GIT_DIFF_DISABLE_PATHSPEC_MATCH, 4096, :GIT_DIFF_SKIP_BINARY_CHECK, 8192, :GIT_DIFF_ENABLE_FAST_UNTRACKED_DIRS, 16384, :GIT_DIFF_UPDATE_INDEX, 32768, :GIT_DIFF_INCLUDE_UNREADABLE, 65536, :GIT_DIFF_INCLUDE_UNREADABLE_AS_UNTRACKED, 131072, :GIT_DIFF_FORCE_TEXT, 1048576, :GIT_DIFF_FORCE_BINARY, 2097152, :GIT_DIFF_IGNORE_WHITESPACE, 4194304, :GIT_DIFF_IGNORE_WHITESPACE_CHANGE, 8388608, :GIT_DIFF_IGNORE_WHITESPACE_EOL, 16777216, :GIT_DIFF_SHOW_UNTRACKED_CONTENT, 33554432, :GIT_DIFF_SHOW_UNMODIFIED, 67108864, :GIT_DIFF_PATIENCE, 268435456, :GIT_DIFF_MINIMAL, 536870912, :GIT_DIFF_SHOW_BINARY, 1073741824, :GIT_DIFF_INDENT_HEURISTIC, 2147483648]
831
+
832
+
833
+ class GitDiff < FFI::Struct
834
+ end
835
+
836
+
837
+ enum :git_diff_flag_t, [:GIT_DIFF_FLAG_BINARY, 1, :GIT_DIFF_FLAG_NOT_BINARY, 2, :GIT_DIFF_FLAG_VALID_ID, 4, :GIT_DIFF_FLAG_EXISTS, 8]
838
+
839
+
840
+ enum :git_delta_t, [:GIT_DELTA_UNMODIFIED, 0, :GIT_DELTA_ADDED, 1, :GIT_DELTA_DELETED, 2, :GIT_DELTA_MODIFIED, 3, :GIT_DELTA_RENAMED, 4, :GIT_DELTA_COPIED, 5, :GIT_DELTA_IGNORED, 6, :GIT_DELTA_UNTRACKED, 7, :GIT_DELTA_TYPECHANGE, 8, :GIT_DELTA_UNREADABLE, 9, :GIT_DELTA_CONFLICTED, 10]
841
+
842
+
843
+ class GitDiffFile < FFI::Struct
844
+ layout :id, GitOid.by_value, :path, :pointer, :size, :git_off_t, :flags, :uint32, :mode, :uint16, :id_abbrev, :uint16
845
+ end
846
+
847
+
848
+ class GitDiffDeltum < FFI::Struct
849
+ layout :status, :git_delta_t, :flags, :uint32, :similarity, :uint16, :nfiles, :uint16, :old_file, GitDiffFile.by_value, :new_file, GitDiffFile.by_value
850
+ end
851
+
852
+
853
+ callback :git_diff_notify_cb, [:pointer, :pointer, :pointer, :pointer], :int32
854
+
855
+ callback :git_diff_progress_cb, [:pointer, :pointer, :pointer, :pointer], :int32
856
+
857
+ class GitDiffOption < FFI::Struct
858
+ layout :version, :uint32, :flags, :uint32, :ignore_submodules, :git_submodule_ignore_t, :pathspec, GitStrarray.by_value, :notify_cb, :git_diff_notify_cb, :progress_cb, :git_diff_progress_cb, :payload, :pointer, :context_lines, :uint32, :interhunk_lines, :uint32, :id_abbrev, :uint16, :max_size, :git_off_t, :old_prefix, :pointer, :new_prefix, :pointer
859
+ end
860
+
861
+
862
+ attach_function :git_diff_init_options, [GitDiffOption.by_ref, :uint32], :int32
863
+
864
+ callback :git_diff_file_cb, [:pointer, :float, :pointer], :int32
865
+
866
+ enum :git_diff_binary_t, [:GIT_DIFF_BINARY_NONE, 0, :GIT_DIFF_BINARY_LITERAL, 1, :GIT_DIFF_BINARY_DELTA, 2]
867
+
868
+
869
+ class GitDiffBinaryFile < FFI::Struct
870
+ layout :type, :git_diff_binary_t, :data, :pointer, :datalen, :uint64, :inflatedlen, :uint64
871
+ end
872
+
873
+
874
+ class GitDiffBinary < FFI::Struct
875
+ layout :contains_data, :uint32, :old_file, GitDiffBinaryFile.by_value, :new_file, GitDiffBinaryFile.by_value
876
+ end
877
+
878
+
879
+ callback :git_diff_binary_cb, [:pointer, :pointer, :pointer], :int32
880
+
881
+ class GitDiffHunk < FFI::Struct
882
+ layout :old_start, :int32, :old_lines, :int32, :new_start, :int32, :new_lines, :int32, :header_len, :uint64, :header, [:int8, 128]
883
+ end
884
+
885
+
886
+ callback :git_diff_hunk_cb, [:pointer, :pointer, :pointer], :int32
887
+
888
+ enum :git_diff_line_t, [:GIT_DIFF_LINE_CONTEXT, 32, :GIT_DIFF_LINE_ADDITION, 43, :GIT_DIFF_LINE_DELETION, 45, :GIT_DIFF_LINE_CONTEXT_EOFNL, 61, :GIT_DIFF_LINE_ADD_EOFNL, 62, :GIT_DIFF_LINE_DEL_EOFNL, 60, :GIT_DIFF_LINE_FILE_HDR, 70, :GIT_DIFF_LINE_HUNK_HDR, 72, :GIT_DIFF_LINE_BINARY, 66]
889
+
890
+
891
+ class GitDiffLine < FFI::Struct
892
+ layout :origin, :int8, :old_lineno, :int32, :new_lineno, :int32, :num_lines, :int32, :content_len, :uint64, :content_offset, :git_off_t, :content, :pointer
893
+ end
894
+
895
+
896
+ callback :git_diff_line_cb, [:pointer, :pointer, :pointer, :pointer], :int32
897
+
898
+ enum :git_diff_find_t, [:GIT_DIFF_FIND_BY_CONFIG, 0, :GIT_DIFF_FIND_RENAMES, 1, :GIT_DIFF_FIND_RENAMES_FROM_REWRITES, 2, :GIT_DIFF_FIND_COPIES, 4, :GIT_DIFF_FIND_COPIES_FROM_UNMODIFIED, 8, :GIT_DIFF_FIND_REWRITES, 16, :GIT_DIFF_BREAK_REWRITES, 32, :GIT_DIFF_FIND_AND_BREAK_REWRITES, 48, :GIT_DIFF_FIND_FOR_UNTRACKED, 64, :GIT_DIFF_FIND_ALL, 255, :GIT_DIFF_FIND_IGNORE_LEADING_WHITESPACE, 0, :GIT_DIFF_FIND_IGNORE_WHITESPACE, 4096, :GIT_DIFF_FIND_DONT_IGNORE_WHITESPACE, 8192, :GIT_DIFF_FIND_EXACT_MATCH_ONLY, 16384, :GIT_DIFF_BREAK_REWRITES_FOR_RENAMES_ONLY, 32768, :GIT_DIFF_FIND_REMOVE_UNMODIFIED, 65536]
899
+
900
+
901
+ class GitDiffSimilarityMetric < FFI::Struct
902
+ layout :file_signature, callback([:pointer, :pointer, :pointer, :pointer], :int32), :buffer_signature, callback([:pointer, :pointer, :pointer, :uint64, :pointer], :int32), :free_signature, callback([:pointer, :pointer], :void), :similarity, callback([:pointer, :pointer, :pointer, :pointer], :int32), :payload, :pointer
903
+ end
904
+
905
+
906
+ class GitDiffFindOption < FFI::Struct
907
+ layout :version, :uint32, :flags, :uint32, :rename_threshold, :uint16, :rename_from_rewrite_threshold, :uint16, :copy_threshold, :uint16, :break_rewrite_threshold, :uint16, :rename_limit, :uint64, :metric, GitDiffSimilarityMetric.by_ref
908
+ end
909
+
910
+
911
+ attach_function :git_diff_find_init_options, [GitDiffFindOption.by_ref, :uint32], :int32
912
+
913
+ attach_function :git_diff_free, [GitDiff.by_ref], :void
914
+
915
+ attach_function :git_diff_tree_to_tree, [:pointer, GitRepository.by_ref, GitTree.by_ref, GitTree.by_ref, :pointer], :int32
916
+
917
+ attach_function :git_diff_tree_to_index, [:pointer, GitRepository.by_ref, GitTree.by_ref, GitIndex.by_ref, :pointer], :int32
918
+
919
+ attach_function :git_diff_index_to_workdir, [:pointer, GitRepository.by_ref, GitIndex.by_ref, :pointer], :int32
920
+
921
+ attach_function :git_diff_tree_to_workdir, [:pointer, GitRepository.by_ref, GitTree.by_ref, :pointer], :int32
922
+
923
+ attach_function :git_diff_tree_to_workdir_with_index, [:pointer, GitRepository.by_ref, GitTree.by_ref, :pointer], :int32
924
+
925
+ attach_function :git_diff_index_to_index, [:pointer, GitRepository.by_ref, GitIndex.by_ref, GitIndex.by_ref, :pointer], :int32
926
+
927
+ attach_function :git_diff_merge, [GitDiff.by_ref, :pointer], :int32
928
+
929
+ attach_function :git_diff_find_similar, [GitDiff.by_ref, :pointer], :int32
930
+
931
+ attach_function :git_diff_num_deltas, [:pointer], :uint64
932
+
933
+ attach_function :git_diff_num_deltas_of_type, [:pointer, :git_delta_t], :uint64
934
+
935
+ attach_function :git_diff_get_delta, [:pointer, :uint64], :pointer
936
+
937
+ attach_function :git_diff_is_sorted_icase, [:pointer], :int32
938
+
939
+ attach_function :git_diff_foreach, [GitDiff.by_ref, :git_diff_file_cb, :git_diff_binary_cb, :git_diff_hunk_cb, :git_diff_line_cb, :pointer], :int32
940
+
941
+ attach_function :git_diff_status_char, [:git_delta_t], :int8
942
+
943
+ enum :git_diff_format_t, [:GIT_DIFF_FORMAT_PATCH, 1, :GIT_DIFF_FORMAT_PATCH_HEADER, 2, :GIT_DIFF_FORMAT_RAW, 3, :GIT_DIFF_FORMAT_NAME_ONLY, 4, :GIT_DIFF_FORMAT_NAME_STATUS, 5]
944
+
945
+
946
+ attach_function :git_diff_print, [GitDiff.by_ref, :git_diff_format_t, :git_diff_line_cb, :pointer], :int32
947
+
948
+ attach_function :git_diff_to_buf, [GitBuf.by_ref, GitDiff.by_ref, :git_diff_format_t], :int32
949
+
950
+ attach_function :git_diff_blobs, [:pointer, :pointer, :pointer, :pointer, :pointer, :git_diff_file_cb, :git_diff_binary_cb, :git_diff_hunk_cb, :git_diff_line_cb, :pointer], :int32
951
+
952
+ attach_function :git_diff_blob_to_buffer, [:pointer, :pointer, :pointer, :uint64, :pointer, :pointer, :git_diff_file_cb, :git_diff_binary_cb, :git_diff_hunk_cb, :git_diff_line_cb, :pointer], :int32
953
+
954
+ attach_function :git_diff_buffers, [:pointer, :uint64, :pointer, :pointer, :uint64, :pointer, :pointer, :git_diff_file_cb, :git_diff_binary_cb, :git_diff_hunk_cb, :git_diff_line_cb, :pointer], :int32
955
+
956
+ attach_function :git_diff_from_buffer, [:pointer, :pointer, :uint64], :int32
957
+
958
+ class GitDiffStat < FFI::Struct
959
+ end
960
+
961
+
962
+ enum :git_diff_stats_format_t, [:GIT_DIFF_STATS_NONE, 0, :GIT_DIFF_STATS_FULL, 1, :GIT_DIFF_STATS_SHORT, 2, :GIT_DIFF_STATS_NUMBER, 4, :GIT_DIFF_STATS_INCLUDE_SUMMARY, 8]
963
+
964
+
965
+ attach_function :git_diff_get_stats, [:pointer, GitDiff.by_ref], :int32
966
+
967
+ attach_function :git_diff_stats_files_changed, [:pointer], :uint64
968
+
969
+ attach_function :git_diff_stats_insertions, [:pointer], :uint64
970
+
971
+ attach_function :git_diff_stats_deletions, [:pointer], :uint64
972
+
973
+ attach_function :git_diff_stats_to_buf, [GitBuf.by_ref, :pointer, :git_diff_stats_format_t, :uint64], :int32
974
+
975
+ attach_function :git_diff_stats_free, [GitDiffStat.by_ref], :void
976
+
977
+ enum :git_diff_format_email_flags_t, [:GIT_DIFF_FORMAT_EMAIL_NONE, 0, :GIT_DIFF_FORMAT_EMAIL_EXCLUDE_SUBJECT_PATCH_MARKER, 1]
978
+
979
+
980
+ class GitDiffFormatEmailOption < FFI::Struct
981
+ layout :version, :uint32, :flags, :git_diff_format_email_flags_t, :patch_no, :uint64, :total_patches, :uint64, :id, :pointer, :summary, :pointer, :body, :pointer, :author, :pointer
982
+ end
983
+
984
+
985
+ attach_function :git_diff_format_email, [GitBuf.by_ref, GitDiff.by_ref, :pointer], :int32
986
+
987
+ attach_function :git_diff_commit_as_email, [GitBuf.by_ref, GitRepository.by_ref, GitCommit.by_ref, :uint64, :uint64, :git_diff_format_email_flags_t, :pointer], :int32
988
+
989
+ attach_function :git_diff_format_email_init_options, [GitDiffFormatEmailOption.by_ref, :uint32], :int32
990
+
991
+ class GitDiffPatchidOption < FFI::Struct
992
+ layout :version, :uint32
993
+ end
994
+
995
+
996
+ attach_function :git_diff_patchid_init_options, [GitDiffPatchidOption.by_ref, :uint32], :int32
997
+
998
+ attach_function :git_diff_patchid, [GitOid.by_ref, GitDiff.by_ref, GitDiffPatchidOption.by_ref], :int32
999
+
1000
+ enum :git_checkout_strategy_t, [:GIT_CHECKOUT_NONE, 0, :GIT_CHECKOUT_SAFE, 1, :GIT_CHECKOUT_FORCE, 2, :GIT_CHECKOUT_RECREATE_MISSING, 4, :GIT_CHECKOUT_ALLOW_CONFLICTS, 16, :GIT_CHECKOUT_REMOVE_UNTRACKED, 32, :GIT_CHECKOUT_REMOVE_IGNORED, 64, :GIT_CHECKOUT_UPDATE_ONLY, 128, :GIT_CHECKOUT_DONT_UPDATE_INDEX, 256, :GIT_CHECKOUT_NO_REFRESH, 512, :GIT_CHECKOUT_SKIP_UNMERGED, 1024, :GIT_CHECKOUT_USE_OURS, 2048, :GIT_CHECKOUT_USE_THEIRS, 4096, :GIT_CHECKOUT_DISABLE_PATHSPEC_MATCH, 8192, :GIT_CHECKOUT_SKIP_LOCKED_DIRECTORIES, 262144, :GIT_CHECKOUT_DONT_OVERWRITE_IGNORED, 524288, :GIT_CHECKOUT_CONFLICT_STYLE_MERGE, 1048576, :GIT_CHECKOUT_CONFLICT_STYLE_DIFF3, 2097152, :GIT_CHECKOUT_DONT_REMOVE_EXISTING, 4194304, :GIT_CHECKOUT_DONT_WRITE_INDEX, 8388608, :GIT_CHECKOUT_UPDATE_SUBMODULES, 65536, :GIT_CHECKOUT_UPDATE_SUBMODULES_IF_CHANGED, 131072]
1001
+
1002
+
1003
+ enum :git_checkout_notify_t, [:GIT_CHECKOUT_NOTIFY_NONE, 0, :GIT_CHECKOUT_NOTIFY_CONFLICT, 1, :GIT_CHECKOUT_NOTIFY_DIRTY, 2, :GIT_CHECKOUT_NOTIFY_UPDATED, 4, :GIT_CHECKOUT_NOTIFY_UNTRACKED, 8, :GIT_CHECKOUT_NOTIFY_IGNORED, 16, :GIT_CHECKOUT_NOTIFY_ALL, 65535]
1004
+
1005
+
1006
+ class GitCheckoutPerfdatum < FFI::Struct
1007
+ layout :mkdir_calls, :uint64, :stat_calls, :uint64, :chmod_calls, :uint64
1008
+ end
1009
+
1010
+
1011
+ callback :git_checkout_notify_cb, [:git_checkout_notify_t, :pointer, :pointer, :pointer, :pointer, :pointer], :int32
1012
+
1013
+ callback :git_checkout_progress_cb, [:pointer, :uint64, :uint64, :pointer], :void
1014
+
1015
+ callback :git_checkout_perfdata_cb, [:pointer, :pointer], :void
1016
+
1017
+ class GitCheckoutOption < FFI::Struct
1018
+ layout :version, :uint32, :checkout_strategy, :uint32, :disable_filters, :int32, :dir_mode, :uint32, :file_mode, :uint32, :file_open_flags, :int32, :notify_flags, :uint32, :notify_cb, :git_checkout_notify_cb, :notify_payload, :pointer, :progress_cb, :git_checkout_progress_cb, :progress_payload, :pointer, :paths, GitStrarray.by_value, :baseline, GitTree.by_ref, :baseline_index, GitIndex.by_ref, :target_directory, :pointer, :ancestor_label, :pointer, :our_label, :pointer, :their_label, :pointer, :perfdata_cb, :git_checkout_perfdata_cb, :perfdata_payload, :pointer
1019
+ end
1020
+
1021
+
1022
+ attach_function :git_checkout_init_options, [GitCheckoutOption.by_ref, :uint32], :int32
1023
+
1024
+ attach_function :git_checkout_head, [GitRepository.by_ref, :pointer], :int32
1025
+
1026
+ attach_function :git_checkout_index, [GitRepository.by_ref, GitIndex.by_ref, :pointer], :int32
1027
+
1028
+ attach_function :git_checkout_tree, [GitRepository.by_ref, :pointer, :pointer], :int32
1029
+
1030
+ class GitOidarray < FFI::Struct
1031
+ layout :ids, GitOid.by_ref, :count, :uint64
1032
+ end
1033
+
1034
+
1035
+ attach_function :git_oidarray_free, [GitOidarray.by_ref], :void
1036
+
1037
+ class GitIndexer < FFI::Struct
1038
+ end
1039
+
1040
+
1041
+ attach_function :git_indexer_new, [:pointer, :pointer, :uint32, GitOdb.by_ref, :git_transfer_progress_cb, :pointer], :int32
1042
+
1043
+ attach_function :git_indexer_append, [GitIndexer.by_ref, :pointer, :uint64, GitTransferProgress.by_ref], :int32
1044
+
1045
+ attach_function :git_indexer_commit, [GitIndexer.by_ref, GitTransferProgress.by_ref], :int32
1046
+
1047
+ attach_function :git_indexer_hash, [:pointer], :pointer
1048
+
1049
+ attach_function :git_indexer_free, [GitIndexer.by_ref], :void
1050
+
1051
+ class GitIndexTime < FFI::Struct
1052
+ layout :seconds, :int32, :nanoseconds, :uint32
1053
+ end
1054
+
1055
+
1056
+ class GitIndexEntry < FFI::Struct
1057
+ layout :ctime, GitIndexTime.by_value, :mtime, GitIndexTime.by_value, :dev, :uint32, :ino, :uint32, :mode, :uint32, :uid, :uint32, :gid, :uint32, :file_size, :uint32, :id, GitOid.by_value, :flags, :uint16, :flags_extended, :uint16, :path, :pointer
1058
+ end
1059
+
1060
+
1061
+ enum :git_indxentry_flag_t, [:GIT_IDXENTRY_EXTENDED, 16384, :GIT_IDXENTRY_VALID, 32768]
1062
+
1063
+
1064
+ enum :git_idxentry_extended_flag_t, [:GIT_IDXENTRY_INTENT_TO_ADD, 8192, :GIT_IDXENTRY_SKIP_WORKTREE, 16384, :GIT_IDXENTRY_EXTENDED2, 32768, :GIT_IDXENTRY_EXTENDED_FLAGS, 24576, :GIT_IDXENTRY_UPDATE, 1, :GIT_IDXENTRY_REMOVE, 2, :GIT_IDXENTRY_UPTODATE, 4, :GIT_IDXENTRY_ADDED, 8, :GIT_IDXENTRY_HASHED, 16, :GIT_IDXENTRY_UNHASHED, 32, :GIT_IDXENTRY_WT_REMOVE, 64, :GIT_IDXENTRY_CONFLICTED, 128, :GIT_IDXENTRY_UNPACKED, 256, :GIT_IDXENTRY_NEW_SKIP_WORKTREE, 512]
1065
+
1066
+
1067
+ enum :git_indexcap_t, [:GIT_INDEXCAP_IGNORE_CASE, 1, :GIT_INDEXCAP_NO_FILEMODE, 2, :GIT_INDEXCAP_NO_SYMLINKS, 4, :GIT_INDEXCAP_FROM_OWNER, -1]
1068
+
1069
+
1070
+ callback :git_index_matched_path_cb, [:pointer, :pointer, :pointer], :int32
1071
+
1072
+ enum :git_index_add_option_t, [:GIT_INDEX_ADD_DEFAULT, 0, :GIT_INDEX_ADD_FORCE, 1, :GIT_INDEX_ADD_DISABLE_PATHSPEC_MATCH, 2, :GIT_INDEX_ADD_CHECK_PATHSPEC, 4]
1073
+
1074
+
1075
+ enum :git_index_stage_t, [:GIT_INDEX_STAGE_ANY, -1, :GIT_INDEX_STAGE_NORMAL, 0, :GIT_INDEX_STAGE_ANCESTOR, 1, :GIT_INDEX_STAGE_OURS, 2, :GIT_INDEX_STAGE_THEIRS, 3]
1076
+
1077
+
1078
+ attach_function :git_index_open, [:pointer, :pointer], :int32
1079
+
1080
+ attach_function :git_index_new, [:pointer], :int32
1081
+
1082
+ attach_function :git_index_free, [GitIndex.by_ref], :void
1083
+
1084
+ attach_function :git_index_owner, [:pointer], GitRepository.by_ref
1085
+
1086
+ attach_function :git_index_caps, [:pointer], :int32
1087
+
1088
+ attach_function :git_index_set_caps, [GitIndex.by_ref, :int32], :int32
1089
+
1090
+ attach_function :git_index_version, [GitIndex.by_ref], :uint32
1091
+
1092
+ attach_function :git_index_set_version, [GitIndex.by_ref, :uint32], :int32
1093
+
1094
+ attach_function :git_index_read, [GitIndex.by_ref, :int32], :int32
1095
+
1096
+ attach_function :git_index_write, [GitIndex.by_ref], :int32
1097
+
1098
+ attach_function :git_index_path, [:pointer], :pointer
1099
+
1100
+ attach_function :git_index_checksum, [GitIndex.by_ref], :pointer
1101
+
1102
+ attach_function :git_index_read_tree, [GitIndex.by_ref, :pointer], :int32
1103
+
1104
+ attach_function :git_index_write_tree, [GitOid.by_ref, GitIndex.by_ref], :int32
1105
+
1106
+ attach_function :git_index_write_tree_to, [GitOid.by_ref, GitIndex.by_ref, GitRepository.by_ref], :int32
1107
+
1108
+ attach_function :git_index_entrycount, [:pointer], :uint64
1109
+
1110
+ attach_function :git_index_clear, [GitIndex.by_ref], :int32
1111
+
1112
+ attach_function :git_index_get_byindex, [GitIndex.by_ref, :uint64], :pointer
1113
+
1114
+ attach_function :git_index_get_bypath, [GitIndex.by_ref, :pointer, :int32], :pointer
1115
+
1116
+ attach_function :git_index_remove, [GitIndex.by_ref, :pointer, :int32], :int32
1117
+
1118
+ attach_function :git_index_remove_directory, [GitIndex.by_ref, :pointer, :int32], :int32
1119
+
1120
+ attach_function :git_index_add, [GitIndex.by_ref, :pointer], :int32
1121
+
1122
+ attach_function :git_index_entry_stage, [:pointer], :int32
1123
+
1124
+ attach_function :git_index_entry_is_conflict, [:pointer], :int32
1125
+
1126
+ attach_function :git_index_add_bypath, [GitIndex.by_ref, :pointer], :int32
1127
+
1128
+ attach_function :git_index_add_frombuffer, [GitIndex.by_ref, :pointer, :pointer, :uint64], :int32
1129
+
1130
+ attach_function :git_index_remove_bypath, [GitIndex.by_ref, :pointer], :int32
1131
+
1132
+ attach_function :git_index_add_all, [GitIndex.by_ref, :pointer, :uint32, :git_index_matched_path_cb, :pointer], :int32
1133
+
1134
+ attach_function :git_index_remove_all, [GitIndex.by_ref, :pointer, :git_index_matched_path_cb, :pointer], :int32
1135
+
1136
+ attach_function :git_index_update_all, [GitIndex.by_ref, :pointer, :git_index_matched_path_cb, :pointer], :int32
1137
+
1138
+ attach_function :git_index_find, [:pointer, GitIndex.by_ref, :pointer], :int32
1139
+
1140
+ attach_function :git_index_find_prefix, [:pointer, GitIndex.by_ref, :pointer], :int32
1141
+
1142
+ attach_function :git_index_conflict_add, [GitIndex.by_ref, :pointer, :pointer, :pointer], :int32
1143
+
1144
+ attach_function :git_index_conflict_get, [:pointer, :pointer, :pointer, GitIndex.by_ref, :pointer], :int32
1145
+
1146
+ attach_function :git_index_conflict_remove, [GitIndex.by_ref, :pointer], :int32
1147
+
1148
+ attach_function :git_index_conflict_cleanup, [GitIndex.by_ref], :int32
1149
+
1150
+ attach_function :git_index_has_conflicts, [:pointer], :int32
1151
+
1152
+ attach_function :git_index_conflict_iterator_new, [:pointer, GitIndex.by_ref], :int32
1153
+
1154
+ attach_function :git_index_conflict_next, [:pointer, :pointer, :pointer, GitIndexConflictIterator.by_ref], :int32
1155
+
1156
+ attach_function :git_index_conflict_iterator_free, [GitIndexConflictIterator.by_ref], :void
1157
+
1158
+ class GitMergeFileInput < FFI::Struct
1159
+ layout :version, :uint32, :ptr, :pointer, :size, :uint64, :path, :pointer, :mode, :uint32
1160
+ end
1161
+
1162
+
1163
+ attach_function :git_merge_file_init_input, [GitMergeFileInput.by_ref, :uint32], :int32
1164
+
1165
+ enum :git_merge_flag_t, [:GIT_MERGE_FIND_RENAMES, 1, :GIT_MERGE_FAIL_ON_CONFLICT, 2, :GIT_MERGE_SKIP_REUC, 4, :GIT_MERGE_NO_RECURSIVE, 8]
1166
+
1167
+
1168
+ enum :git_merge_file_favor_t, [:GIT_MERGE_FILE_FAVOR_NORMAL, 0, :GIT_MERGE_FILE_FAVOR_OURS, 1, :GIT_MERGE_FILE_FAVOR_THEIRS, 2, :GIT_MERGE_FILE_FAVOR_UNION, 3]
1169
+
1170
+
1171
+ enum :git_merge_file_flag_t, [:GIT_MERGE_FILE_DEFAULT, 0, :GIT_MERGE_FILE_STYLE_MERGE, 1, :GIT_MERGE_FILE_STYLE_DIFF3, 2, :GIT_MERGE_FILE_SIMPLIFY_ALNUM, 4, :GIT_MERGE_FILE_IGNORE_WHITESPACE, 8, :GIT_MERGE_FILE_IGNORE_WHITESPACE_CHANGE, 16, :GIT_MERGE_FILE_IGNORE_WHITESPACE_EOL, 32, :GIT_MERGE_FILE_DIFF_PATIENCE, 64, :GIT_MERGE_FILE_DIFF_MINIMAL, 128]
1172
+
1173
+
1174
+ class GitMergeFileOption < FFI::Struct
1175
+ layout :version, :uint32, :ancestor_label, :pointer, :our_label, :pointer, :their_label, :pointer, :favor, :git_merge_file_favor_t, :flags, :git_merge_file_flag_t, :marker_size, :uint16
1176
+ end
1177
+
1178
+
1179
+ attach_function :git_merge_file_init_options, [GitMergeFileOption.by_ref, :uint32], :int32
1180
+
1181
+ class GitMergeFileResult < FFI::Struct
1182
+ layout :automergeable, :uint32, :path, :pointer, :mode, :uint32, :ptr, :pointer, :len, :uint64
1183
+ end
1184
+
1185
+
1186
+ class GitMergeOption < FFI::Struct
1187
+ layout :version, :uint32, :flags, :git_merge_flag_t, :rename_threshold, :uint32, :target_limit, :uint32, :metric, GitDiffSimilarityMetric.by_ref, :recursion_limit, :uint32, :default_driver, :pointer, :file_favor, :git_merge_file_favor_t, :file_flags, :git_merge_file_flag_t
1188
+ end
1189
+
1190
+
1191
+ attach_function :git_merge_init_options, [GitMergeOption.by_ref, :uint32], :int32
1192
+
1193
+ enum :git_merge_analysis_t, [:GIT_MERGE_ANALYSIS_NONE, 0, :GIT_MERGE_ANALYSIS_NORMAL, 1, :GIT_MERGE_ANALYSIS_UP_TO_DATE, 2, :GIT_MERGE_ANALYSIS_FASTFORWARD, 4, :GIT_MERGE_ANALYSIS_UNBORN, 8]
1194
+
1195
+
1196
+ enum :git_merge_preference_t, [:GIT_MERGE_PREFERENCE_NONE, 0, :GIT_MERGE_PREFERENCE_NO_FASTFORWARD, 1, :GIT_MERGE_PREFERENCE_FASTFORWARD_ONLY, 2]
1197
+
1198
+
1199
+ attach_function :git_merge_analysis, [:pointer, :pointer, GitRepository.by_ref, :pointer, :uint64], :int32
1200
+
1201
+ attach_function :git_merge_base, [GitOid.by_ref, GitRepository.by_ref, :pointer, :pointer], :int32
1202
+
1203
+ attach_function :git_merge_bases, [GitOidarray.by_ref, GitRepository.by_ref, :pointer, :pointer], :int32
1204
+
1205
+ attach_function :git_merge_base_many, [GitOid.by_ref, GitRepository.by_ref, :uint64, :pointer], :int32
1206
+
1207
+ attach_function :git_merge_bases_many, [GitOidarray.by_ref, GitRepository.by_ref, :uint64, :pointer], :int32
1208
+
1209
+ attach_function :git_merge_base_octopus, [GitOid.by_ref, GitRepository.by_ref, :uint64, :pointer], :int32
1210
+
1211
+ attach_function :git_merge_file, [GitMergeFileResult.by_ref, :pointer, :pointer, :pointer, :pointer], :int32
1212
+
1213
+ attach_function :git_merge_file_from_index, [GitMergeFileResult.by_ref, GitRepository.by_ref, :pointer, :pointer, :pointer, :pointer], :int32
1214
+
1215
+ attach_function :git_merge_file_result_free, [GitMergeFileResult.by_ref], :void
1216
+
1217
+ attach_function :git_merge_trees, [:pointer, GitRepository.by_ref, :pointer, :pointer, :pointer, :pointer], :int32
1218
+
1219
+ attach_function :git_merge_commits, [:pointer, GitRepository.by_ref, :pointer, :pointer, :pointer], :int32
1220
+
1221
+ attach_function :git_merge, [GitRepository.by_ref, :pointer, :uint64, :pointer, :pointer], :int32
1222
+
1223
+ class GitCherrypickOption < FFI::Struct
1224
+ layout :version, :uint32, :mainline, :uint32, :merge_opts, GitMergeOption.by_value, :checkout_opts, GitCheckoutOption.by_value
1225
+ end
1226
+
1227
+
1228
+ attach_function :git_cherrypick_init_options, [GitCherrypickOption.by_ref, :uint32], :int32
1229
+
1230
+ attach_function :git_cherrypick_commit, [:pointer, GitRepository.by_ref, GitCommit.by_ref, GitCommit.by_ref, :uint32, :pointer], :int32
1231
+
1232
+ attach_function :git_cherrypick, [GitRepository.by_ref, GitCommit.by_ref, :pointer], :int32
1233
+
1234
+ enum :git_direction, [:GIT_DIRECTION_FETCH, 0, :GIT_DIRECTION_PUSH, 1]
1235
+
1236
+
1237
+ class GitRemoteHead < FFI::Struct
1238
+ layout :local, :int32, :oid, GitOid.by_value, :loid, GitOid.by_value, :name, :pointer, :symref_target, :pointer
1239
+ end
1240
+
1241
+ callback :git_headlist_cb, [GitRemoteHead.by_ref, :pointer], :int32
1242
+
1243
+ attach_function :git_refspec_src, [:pointer], :pointer
1244
+
1245
+ attach_function :git_refspec_dst, [:pointer], :pointer
1246
+
1247
+ attach_function :git_refspec_string, [:pointer], :pointer
1248
+
1249
+ attach_function :git_refspec_force, [:pointer], :int32
1250
+
1251
+ attach_function :git_refspec_direction, [:pointer], :git_direction
1252
+
1253
+ attach_function :git_refspec_src_matches, [:pointer, :pointer], :int32
1254
+
1255
+ attach_function :git_refspec_dst_matches, [:pointer, :pointer], :int32
1256
+
1257
+ attach_function :git_refspec_transform, [GitBuf.by_ref, :pointer, :pointer], :int32
1258
+
1259
+ attach_function :git_refspec_rtransform, [GitBuf.by_ref, :pointer, :pointer], :int32
1260
+
1261
+ callback :git_transport_cb, [:pointer, GitRemote.by_ref, :pointer], :int32
1262
+
1263
+ enum :git_cert_ssh_t, [:GIT_CERT_SSH_MD5, 1, :GIT_CERT_SSH_SHA1, 2]
1264
+
1265
+
1266
+ class GitCertHostkey < FFI::Struct
1267
+ layout :parent, GitCert.by_value, :type, :git_cert_ssh_t, :hash_md5, [:uint8, 16], :hash_sha1, [:uint8, 20]
1268
+ end
1269
+
1270
+
1271
+ class GitCertX509 < FFI::Struct
1272
+ layout :parent, GitCert.by_value, :data, :pointer, :len, :uint64
1273
+ end
1274
+
1275
+
1276
+ enum :git_credtype_t, [:GIT_CREDTYPE_USERPASS_PLAINTEXT, 1, :GIT_CREDTYPE_SSH_KEY, 2, :GIT_CREDTYPE_SSH_CUSTOM, 4, :GIT_CREDTYPE_DEFAULT, 8, :GIT_CREDTYPE_SSH_INTERACTIVE, 16, :GIT_CREDTYPE_USERNAME, 32, :GIT_CREDTYPE_SSH_MEMORY, 64]
1277
+
1278
+
1279
+ class GitCred < FFI::Struct
1280
+ end
1281
+
1282
+
1283
+ class GitCred < FFI::Struct
1284
+ layout :credtype, :git_credtype_t, :free, callback([GitCred.by_ref], :void)
1285
+ end
1286
+
1287
+ class GitCredUserpassPlaintext < FFI::Struct
1288
+ layout :parent, GitCred.by_value, :username, :pointer, :password, :pointer
1289
+ end
1290
+
1291
+
1292
+ class Libssh2Session < FFI::Struct
1293
+ end
1294
+
1295
+
1296
+ class Libssh2UserauthKbdintPrompt < FFI::Struct
1297
+ end
1298
+
1299
+
1300
+ class Libssh2UserauthKbdintResponse < FFI::Struct
1301
+ end
1302
+
1303
+
1304
+ callback :git_cred_sign_callback, [:pointer, :pointer, :pointer, :pointer, :uint64, :pointer], :int32
1305
+
1306
+ callback :git_cred_ssh_interactive_callback, [:pointer, :int32, :pointer, :int32, :int32, :pointer, :pointer, :pointer], :void
1307
+
1308
+ class GitCredSshKey < FFI::Struct
1309
+ layout :parent, GitCred.by_value, :username, :pointer, :publickey, :pointer, :privatekey, :pointer, :passphrase, :pointer
1310
+ end
1311
+
1312
+
1313
+ class GitCredSshInteractive < FFI::Struct
1314
+ layout :parent, GitCred.by_value, :username, :pointer, :prompt_callback, :git_cred_ssh_interactive_callback, :payload, :pointer
1315
+ end
1316
+
1317
+
1318
+ class GitCredSshCustom < FFI::Struct
1319
+ layout :parent, GitCred.by_value, :username, :pointer, :publickey, :pointer, :publickey_len, :uint64, :sign_callback, :git_cred_sign_callback, :payload, :pointer
1320
+ end
1321
+
1322
+
1323
+
1324
+ class GitCredUsername < FFI::Struct
1325
+ layout :parent, GitCred.by_value, :username, [:int8, 1]
1326
+ end
1327
+
1328
+
1329
+ attach_function :git_cred_has_username, [GitCred.by_ref], :int32
1330
+
1331
+ attach_function :git_cred_userpass_plaintext_new, [:pointer, :pointer, :pointer], :int32
1332
+
1333
+ attach_function :git_cred_ssh_key_new, [:pointer, :pointer, :pointer, :pointer, :pointer], :int32
1334
+
1335
+ attach_function :git_cred_ssh_interactive_new, [:pointer, :pointer, :git_cred_ssh_interactive_callback, :pointer], :int32
1336
+
1337
+ attach_function :git_cred_ssh_key_from_agent, [:pointer, :pointer], :int32
1338
+
1339
+ attach_function :git_cred_ssh_custom_new, [:pointer, :pointer, :pointer, :uint64, :git_cred_sign_callback, :pointer], :int32
1340
+
1341
+ attach_function :git_cred_default_new, [:pointer], :int32
1342
+
1343
+ attach_function :git_cred_username_new, [:pointer, :pointer], :int32
1344
+
1345
+ attach_function :git_cred_ssh_key_memory_new, [:pointer, :pointer, :pointer, :pointer, :pointer], :int32
1346
+
1347
+ attach_function :git_cred_free, [GitCred.by_ref], :void
1348
+
1349
+ callback :git_cred_acquire_cb, [:pointer, :pointer, :pointer, :uint32, :pointer], :int32
1350
+
1351
+ enum :git_packbuilder_stage_t, [:GIT_PACKBUILDER_ADDING_OBJECTS, 0, :GIT_PACKBUILDER_DELTAFICATION, 1]
1352
+
1353
+
1354
+ attach_function :git_packbuilder_new, [:pointer, GitRepository.by_ref], :int32
1355
+
1356
+ attach_function :git_packbuilder_set_threads, [GitPackbuilder.by_ref, :uint32], :uint32
1357
+
1358
+ attach_function :git_packbuilder_insert, [GitPackbuilder.by_ref, :pointer, :pointer], :int32
1359
+
1360
+ attach_function :git_packbuilder_insert_tree, [GitPackbuilder.by_ref, :pointer], :int32
1361
+
1362
+ attach_function :git_packbuilder_insert_commit, [GitPackbuilder.by_ref, :pointer], :int32
1363
+
1364
+ attach_function :git_packbuilder_insert_walk, [GitPackbuilder.by_ref, GitRevwalk.by_ref], :int32
1365
+
1366
+ attach_function :git_packbuilder_insert_recur, [GitPackbuilder.by_ref, :pointer, :pointer], :int32
1367
+
1368
+ attach_function :git_packbuilder_write_buf, [GitBuf.by_ref, GitPackbuilder.by_ref], :int32
1369
+
1370
+ attach_function :git_packbuilder_write, [GitPackbuilder.by_ref, :pointer, :uint32, :git_transfer_progress_cb, :pointer], :int32
1371
+
1372
+ attach_function :git_packbuilder_hash, [GitPackbuilder.by_ref], :pointer
1373
+
1374
+ callback :git_packbuilder_foreach_cb, [:pointer, :uint64, :pointer], :int32
1375
+
1376
+ attach_function :git_packbuilder_foreach, [GitPackbuilder.by_ref, :git_packbuilder_foreach_cb, :pointer], :int32
1377
+
1378
+ attach_function :git_packbuilder_object_count, [GitPackbuilder.by_ref], :uint64
1379
+
1380
+ attach_function :git_packbuilder_written, [GitPackbuilder.by_ref], :uint64
1381
+
1382
+ callback :git_packbuilder_progress, [:int32, :uint32, :uint32, :pointer], :int32
1383
+
1384
+ attach_function :git_packbuilder_set_callbacks, [GitPackbuilder.by_ref, :git_packbuilder_progress, :pointer], :int32
1385
+
1386
+ attach_function :git_packbuilder_free, [GitPackbuilder.by_ref], :void
1387
+
1388
+ enum :git_proxy_t, [:GIT_PROXY_NONE, 0, :GIT_PROXY_AUTO, 1, :GIT_PROXY_SPECIFIED, 2]
1389
+
1390
+
1391
+ class GitProxyOption < FFI::Struct
1392
+ layout :version, :uint32, :type, :git_proxy_t, :url, :pointer, :credentials, :git_cred_acquire_cb, :certificate_check, :git_transport_certificate_check_cb, :payload, :pointer
1393
+ end
1394
+
1395
+
1396
+ attach_function :git_proxy_init_options, [GitProxyOption.by_ref, :uint32], :int32
1397
+
1398
+ attach_function :git_remote_create, [:pointer, GitRepository.by_ref, :pointer, :pointer], :int32
1399
+
1400
+ attach_function :git_remote_create_with_fetchspec, [:pointer, GitRepository.by_ref, :pointer, :pointer, :pointer], :int32
1401
+
1402
+ attach_function :git_remote_create_anonymous, [:pointer, GitRepository.by_ref, :pointer], :int32
1403
+
1404
+ attach_function :git_remote_create_detached, [:pointer, :pointer], :int32
1405
+
1406
+ attach_function :git_remote_lookup, [:pointer, GitRepository.by_ref, :pointer], :int32
1407
+
1408
+ attach_function :git_remote_dup, [:pointer, GitRemote.by_ref], :int32
1409
+
1410
+ attach_function :git_remote_owner, [:pointer], GitRepository.by_ref
1411
+
1412
+ attach_function :git_remote_name, [:pointer], :pointer
1413
+
1414
+ attach_function :git_remote_url, [:pointer], :pointer
1415
+
1416
+ attach_function :git_remote_pushurl, [:pointer], :pointer
1417
+
1418
+ attach_function :git_remote_set_url, [GitRepository.by_ref, :pointer, :pointer], :int32
1419
+
1420
+ attach_function :git_remote_set_pushurl, [GitRepository.by_ref, :pointer, :pointer], :int32
1421
+
1422
+ attach_function :git_remote_add_fetch, [GitRepository.by_ref, :pointer, :pointer], :int32
1423
+
1424
+ attach_function :git_remote_get_fetch_refspecs, [GitStrarray.by_ref, :pointer], :int32
1425
+
1426
+ attach_function :git_remote_add_push, [GitRepository.by_ref, :pointer, :pointer], :int32
1427
+
1428
+ attach_function :git_remote_get_push_refspecs, [GitStrarray.by_ref, :pointer], :int32
1429
+
1430
+ attach_function :git_remote_refspec_count, [:pointer], :uint64
1431
+
1432
+ attach_function :git_remote_get_refspec, [:pointer, :uint64], :pointer
1433
+
1434
+ attach_function :git_remote_connect, [GitRemote.by_ref, :git_direction, :pointer, :pointer, :pointer], :int32
1435
+
1436
+ attach_function :git_remote_ls, [:pointer, :pointer, GitRemote.by_ref], :int32
1437
+
1438
+ attach_function :git_remote_connected, [:pointer], :int32
1439
+
1440
+ attach_function :git_remote_stop, [GitRemote.by_ref], :void
1441
+
1442
+ attach_function :git_remote_disconnect, [GitRemote.by_ref], :void
1443
+
1444
+ attach_function :git_remote_free, [GitRemote.by_ref], :void
1445
+
1446
+ attach_function :git_remote_list, [GitStrarray.by_ref, GitRepository.by_ref], :int32
1447
+
1448
+ enum :git_remote_completion_type, [:GIT_REMOTE_COMPLETION_DOWNLOAD, 0, :GIT_REMOTE_COMPLETION_INDEXING, 1, :GIT_REMOTE_COMPLETION_ERROR, 2]
1449
+
1450
+
1451
+ callback :git_push_transfer_progress, [:uint32, :uint32, :uint64, :pointer], :int32
1452
+
1453
+ class GitPushUpdate < FFI::Struct
1454
+ layout :src_refname, :pointer, :dst_refname, :pointer, :src, GitOid.by_value, :dst, GitOid.by_value
1455
+ end
1456
+
1457
+
1458
+ callback :git_push_negotiation, [:pointer, :uint64, :pointer], :int32
1459
+
1460
+ callback :git_push_update_reference_cb, [:pointer, :pointer, :pointer], :int32
1461
+
1462
+ class GitRemoteCallback < FFI::Struct
1463
+ layout :version, :uint32, :sideband_progress, :git_transport_message_cb, :completion, callback([:git_remote_completion_type, :pointer], :int32), :credentials, :git_cred_acquire_cb, :certificate_check, :git_transport_certificate_check_cb, :transfer_progress, :git_transfer_progress_cb, :update_tips, callback([:pointer, :pointer, :pointer, :pointer], :int32), :pack_progress, :git_packbuilder_progress, :push_transfer_progress, :git_push_transfer_progress, :push_update_reference, :git_push_update_reference_cb, :push_negotiation, :git_push_negotiation, :transport, :git_transport_cb, :payload, :pointer
1464
+ end
1465
+
1466
+ attach_function :git_remote_init_callbacks, [GitRemoteCallback.by_ref, :uint32], :int32
1467
+
1468
+ enum :git_fetch_prune_t, [:GIT_FETCH_PRUNE_UNSPECIFIED, 0, :GIT_FETCH_PRUNE, 1, :GIT_FETCH_NO_PRUNE, 2]
1469
+
1470
+
1471
+ enum :git_remote_autotag_option_t, [:GIT_REMOTE_DOWNLOAD_TAGS_UNSPECIFIED, 0, :GIT_REMOTE_DOWNLOAD_TAGS_AUTO, 1, :GIT_REMOTE_DOWNLOAD_TAGS_NONE, 2, :GIT_REMOTE_DOWNLOAD_TAGS_ALL, 3]
1472
+
1473
+
1474
+ class GitFetchOption < FFI::Struct
1475
+ layout :version, :int32, :callbacks, GitRemoteCallback.by_value, :prune, :git_fetch_prune_t, :update_fetchhead, :int32, :download_tags, :git_remote_autotag_option_t, :proxy_opts, GitProxyOption.by_value, :custom_headers, GitStrarray.by_value
1476
+ end
1477
+
1478
+
1479
+ attach_function :git_fetch_init_options, [GitFetchOption.by_ref, :uint32], :int32
1480
+
1481
+ class GitPushOption < FFI::Struct
1482
+ layout :version, :uint32, :pb_parallelism, :uint32, :callbacks, GitRemoteCallback.by_value, :proxy_opts, GitProxyOption.by_value, :custom_headers, GitStrarray.by_value
1483
+ end
1484
+
1485
+
1486
+ attach_function :git_push_init_options, [GitPushOption.by_ref, :uint32], :int32
1487
+
1488
+ attach_function :git_remote_download, [GitRemote.by_ref, :pointer, :pointer], :int32
1489
+
1490
+ attach_function :git_remote_upload, [GitRemote.by_ref, :pointer, :pointer], :int32
1491
+
1492
+ attach_function :git_remote_update_tips, [GitRemote.by_ref, :pointer, :int32, :git_remote_autotag_option_t, :pointer], :int32
1493
+
1494
+ attach_function :git_remote_fetch, [GitRemote.by_ref, :pointer, :pointer, :pointer], :int32
1495
+
1496
+ attach_function :git_remote_prune, [GitRemote.by_ref, :pointer], :int32
1497
+
1498
+ attach_function :git_remote_push, [GitRemote.by_ref, :pointer, :pointer], :int32
1499
+
1500
+ attach_function :git_remote_stats, [GitRemote.by_ref], :pointer
1501
+
1502
+ attach_function :git_remote_autotag, [:pointer], :git_remote_autotag_option_t
1503
+
1504
+ attach_function :git_remote_set_autotag, [GitRepository.by_ref, :pointer, :git_remote_autotag_option_t], :int32
1505
+
1506
+ attach_function :git_remote_prune_refs, [:pointer], :int32
1507
+
1508
+ attach_function :git_remote_rename, [GitStrarray.by_ref, GitRepository.by_ref, :pointer, :pointer], :int32
1509
+
1510
+ attach_function :git_remote_is_valid_name, [:pointer], :int32
1511
+
1512
+ attach_function :git_remote_delete, [GitRepository.by_ref, :pointer], :int32
1513
+
1514
+ attach_function :git_remote_default_branch, [GitBuf.by_ref, GitRemote.by_ref], :int32
1515
+
1516
+ enum :git_clone_local_t, [:GIT_CLONE_LOCAL_AUTO, 0, :GIT_CLONE_LOCAL, 1, :GIT_CLONE_NO_LOCAL, 2, :GIT_CLONE_LOCAL_NO_LINKS, 3]
1517
+
1518
+
1519
+ callback :git_remote_create_cb, [:pointer, GitRepository.by_ref, :pointer, :pointer, :pointer], :int32
1520
+
1521
+ callback :git_repository_create_cb, [:pointer, :pointer, :int32, :pointer], :int32
1522
+
1523
+ class GitCloneOption < FFI::Struct
1524
+ layout :version, :uint32, :checkout_opts, GitCheckoutOption.by_value, :fetch_opts, GitFetchOption.by_value, :bare, :int32, :local, :git_clone_local_t, :checkout_branch, :pointer, :repository_cb, :git_repository_create_cb, :repository_cb_payload, :pointer, :remote_cb, :git_remote_create_cb, :remote_cb_payload, :pointer
1525
+ end
1526
+
1527
+
1528
+ attach_function :git_clone_init_options, [GitCloneOption.by_ref, :uint32], :int32
1529
+
1530
+ attach_function :git_clone, [:pointer, :pointer, :pointer, :pointer], :int32
1531
+
1532
+ attach_function :git_commit_lookup, [:pointer, GitRepository.by_ref, :pointer], :int32
1533
+
1534
+ attach_function :git_commit_lookup_prefix, [:pointer, GitRepository.by_ref, :pointer, :uint64], :int32
1535
+
1536
+ attach_function :git_commit_free, [GitCommit.by_ref], :void
1537
+
1538
+ attach_function :git_commit_id, [:pointer], :pointer
1539
+
1540
+ attach_function :git_commit_owner, [:pointer], GitRepository.by_ref
1541
+
1542
+ attach_function :git_commit_message_encoding, [:pointer], :pointer
1543
+
1544
+ attach_function :git_commit_message, [:pointer], :pointer
1545
+
1546
+ attach_function :git_commit_message_raw, [:pointer], :pointer
1547
+
1548
+ attach_function :git_commit_summary, [GitCommit.by_ref], :pointer
1549
+
1550
+ attach_function :git_commit_body, [GitCommit.by_ref], :pointer
1551
+
1552
+ attach_function :git_commit_time, [:pointer], :git_time_t
1553
+
1554
+ attach_function :git_commit_time_offset, [:pointer], :int32
1555
+
1556
+ attach_function :git_commit_committer, [:pointer], :pointer
1557
+
1558
+ attach_function :git_commit_author, [:pointer], :pointer
1559
+
1560
+ attach_function :git_commit_raw_header, [:pointer], :pointer
1561
+
1562
+ attach_function :git_commit_tree, [:pointer, :pointer], :int32
1563
+
1564
+ attach_function :git_commit_tree_id, [:pointer], :pointer
1565
+
1566
+ attach_function :git_commit_parentcount, [:pointer], :uint32
1567
+
1568
+ attach_function :git_commit_parent, [:pointer, :pointer, :uint32], :int32
1569
+
1570
+ attach_function :git_commit_parent_id, [:pointer, :uint32], :pointer
1571
+
1572
+ attach_function :git_commit_nth_gen_ancestor, [:pointer, :pointer, :uint32], :int32
1573
+
1574
+ attach_function :git_commit_header_field, [GitBuf.by_ref, :pointer, :pointer], :int32
1575
+
1576
+ attach_function :git_commit_extract_signature, [GitBuf.by_ref, GitBuf.by_ref, GitRepository.by_ref, GitOid.by_ref, :pointer], :int32
1577
+
1578
+ attach_function :git_commit_create, [GitOid.by_ref, GitRepository.by_ref, :pointer, :pointer, :pointer, :pointer, :pointer, :pointer, :uint64, :pointer], :int32
1579
+
1580
+ attach_function :git_commit_create_v, [GitOid.by_ref, GitRepository.by_ref, :pointer, :pointer, :pointer, :pointer, :pointer, :pointer, :uint64], :int32
1581
+
1582
+ attach_function :git_commit_amend, [GitOid.by_ref, :pointer, :pointer, :pointer, :pointer, :pointer, :pointer, :pointer], :int32
1583
+
1584
+ attach_function :git_commit_create_buffer, [GitBuf.by_ref, GitRepository.by_ref, :pointer, :pointer, :pointer, :pointer, :pointer, :uint64, :pointer], :int32
1585
+
1586
+ attach_function :git_commit_create_with_signature, [GitOid.by_ref, GitRepository.by_ref, :pointer, :pointer, :pointer], :int32
1587
+
1588
+ attach_function :git_commit_dup, [:pointer, GitCommit.by_ref], :int32
1589
+
1590
+ enum :git_config_level_t, [:GIT_CONFIG_LEVEL_PROGRAMDATA, 1, :GIT_CONFIG_LEVEL_SYSTEM, 2, :GIT_CONFIG_LEVEL_XDG, 3, :GIT_CONFIG_LEVEL_GLOBAL, 4, :GIT_CONFIG_LEVEL_LOCAL, 5, :GIT_CONFIG_LEVEL_APP, 6, :GIT_CONFIG_HIGHEST_LEVEL, -1]
1591
+
1592
+
1593
+ class GitConfigEntry < FFI::Struct
1594
+ layout :name, :pointer, :value, :pointer, :level, :git_config_level_t, :free, callback([GitConfigEntry.by_ref], :void), :payload, :pointer
1595
+ end
1596
+
1597
+
1598
+ attach_function :git_config_entry_free, [GitConfigEntry.by_ref], :void
1599
+
1600
+ callback :git_config_foreach_cb, [:pointer, :pointer], :int32
1601
+
1602
+ class GitConfigIterator < FFI::Struct
1603
+ end
1604
+
1605
+
1606
+ enum :git_cvar_t, [:GIT_CVAR_FALSE, 0, :GIT_CVAR_TRUE, 1, :GIT_CVAR_INT32, 2, :GIT_CVAR_STRING, 3]
1607
+
1608
+
1609
+ class GitCvarMap < FFI::Struct
1610
+ layout :cvar_type, :git_cvar_t, :str_match, :pointer, :map_value, :int32
1611
+ end
1612
+
1613
+
1614
+ attach_function :git_config_find_global, [GitBuf.by_ref], :int32
1615
+
1616
+ attach_function :git_config_find_xdg, [GitBuf.by_ref], :int32
1617
+
1618
+ attach_function :git_config_find_system, [GitBuf.by_ref], :int32
1619
+
1620
+ attach_function :git_config_find_programdata, [GitBuf.by_ref], :int32
1621
+
1622
+ attach_function :git_config_open_default, [:pointer], :int32
1623
+
1624
+ attach_function :git_config_new, [:pointer], :int32
1625
+
1626
+ attach_function :git_config_add_file_ondisk, [GitConfig.by_ref, :pointer, :git_config_level_t, :pointer, :int32], :int32
1627
+
1628
+ attach_function :git_config_open_ondisk, [:pointer, :pointer], :int32
1629
+
1630
+ attach_function :git_config_open_level, [:pointer, :pointer, :git_config_level_t], :int32
1631
+
1632
+ attach_function :git_config_open_global, [:pointer, GitConfig.by_ref], :int32
1633
+
1634
+ attach_function :git_config_snapshot, [:pointer, GitConfig.by_ref], :int32
1635
+
1636
+ attach_function :git_config_free, [GitConfig.by_ref], :void
1637
+
1638
+ attach_function :git_config_get_entry, [:pointer, :pointer, :pointer], :int32
1639
+
1640
+ attach_function :git_config_get_int32, [:pointer, :pointer, :pointer], :int32
1641
+
1642
+ attach_function :git_config_get_int64, [:pointer, :pointer, :pointer], :int32
1643
+
1644
+ attach_function :git_config_get_bool, [:pointer, :pointer, :pointer], :int32
1645
+
1646
+ attach_function :git_config_get_path, [GitBuf.by_ref, :pointer, :pointer], :int32
1647
+
1648
+ attach_function :git_config_get_string, [:pointer, :pointer, :pointer], :int32
1649
+
1650
+ attach_function :git_config_get_string_buf, [GitBuf.by_ref, :pointer, :pointer], :int32
1651
+
1652
+ attach_function :git_config_get_multivar_foreach, [:pointer, :pointer, :pointer, :git_config_foreach_cb, :pointer], :int32
1653
+
1654
+ attach_function :git_config_multivar_iterator_new, [:pointer, :pointer, :pointer, :pointer], :int32
1655
+
1656
+ attach_function :git_config_next, [:pointer, GitConfigIterator.by_ref], :int32
1657
+
1658
+ attach_function :git_config_iterator_free, [GitConfigIterator.by_ref], :void
1659
+
1660
+ attach_function :git_config_set_int32, [GitConfig.by_ref, :pointer, :int32], :int32
1661
+
1662
+ attach_function :git_config_set_int64, [GitConfig.by_ref, :pointer, :int64], :int32
1663
+
1664
+ attach_function :git_config_set_bool, [GitConfig.by_ref, :pointer, :int32], :int32
1665
+
1666
+ attach_function :git_config_set_string, [GitConfig.by_ref, :pointer, :pointer], :int32
1667
+
1668
+ attach_function :git_config_set_multivar, [GitConfig.by_ref, :pointer, :pointer, :pointer], :int32
1669
+
1670
+ attach_function :git_config_delete_entry, [GitConfig.by_ref, :pointer], :int32
1671
+
1672
+ attach_function :git_config_delete_multivar, [GitConfig.by_ref, :pointer, :pointer], :int32
1673
+
1674
+ attach_function :git_config_foreach, [:pointer, :git_config_foreach_cb, :pointer], :int32
1675
+
1676
+ attach_function :git_config_iterator_new, [:pointer, :pointer], :int32
1677
+
1678
+ attach_function :git_config_iterator_glob_new, [:pointer, :pointer, :pointer], :int32
1679
+
1680
+ attach_function :git_config_foreach_match, [:pointer, :pointer, :git_config_foreach_cb, :pointer], :int32
1681
+
1682
+ attach_function :git_config_get_mapped, [:pointer, :pointer, :pointer, :pointer, :uint64], :int32
1683
+
1684
+ attach_function :git_config_lookup_map_value, [:pointer, :pointer, :uint64, :pointer], :int32
1685
+
1686
+ attach_function :git_config_parse_bool, [:pointer, :pointer], :int32
1687
+
1688
+ attach_function :git_config_parse_int32, [:pointer, :pointer], :int32
1689
+
1690
+ attach_function :git_config_parse_int64, [:pointer, :pointer], :int32
1691
+
1692
+ attach_function :git_config_parse_path, [GitBuf.by_ref, :pointer], :int32
1693
+
1694
+ attach_function :git_config_backend_foreach_match, [GitConfigBackend.by_ref, :pointer, :git_config_foreach_cb, :pointer], :int32
1695
+
1696
+ attach_function :git_config_lock, [:pointer, GitConfig.by_ref], :int32
1697
+
1698
+ enum :git_describe_strategy_t, [:GIT_DESCRIBE_DEFAULT, 0, :GIT_DESCRIBE_TAGS, 1, :GIT_DESCRIBE_ALL, 2]
1699
+
1700
+
1701
+ class GitDescribeOption < FFI::Struct
1702
+ layout :version, :uint32, :max_candidates_tags, :uint32, :describe_strategy, :uint32, :pattern, :pointer, :only_follow_first_parent, :int32, :show_commit_oid_as_fallback, :int32
1703
+ end
1704
+
1705
+
1706
+ attach_function :git_describe_init_options, [GitDescribeOption.by_ref, :uint32], :int32
1707
+
1708
+ class GitDescribeFormatOption < FFI::Struct
1709
+ layout :version, :uint32, :abbreviated_size, :uint32, :always_use_long_format, :int32, :dirty_suffix, :pointer
1710
+ end
1711
+
1712
+
1713
+ attach_function :git_describe_init_format_options, [GitDescribeFormatOption.by_ref, :uint32], :int32
1714
+
1715
+ class GitDescribeResult < FFI::Struct
1716
+ end
1717
+
1718
+
1719
+ attach_function :git_describe_commit, [:pointer, GitObject.by_ref, GitDescribeOption.by_ref], :int32
1720
+
1721
+ attach_function :git_describe_workdir, [:pointer, GitRepository.by_ref, GitDescribeOption.by_ref], :int32
1722
+
1723
+ attach_function :git_describe_format, [GitBuf.by_ref, :pointer, :pointer], :int32
1724
+
1725
+ attach_function :git_describe_result_free, [GitDescribeResult.by_ref], :void
1726
+
1727
+ enum :git_error_code, [:GIT_OK, 0, :GIT_ERROR, -1, :GIT_ENOTFOUND, -3, :GIT_EEXISTS, -4, :GIT_EAMBIGUOUS, -5, :GIT_EBUFS, -6, :GIT_EUSER, -7, :GIT_EBAREREPO, -8, :GIT_EUNBORNBRANCH, -9, :GIT_EUNMERGED, -10, :GIT_ENONFASTFORWARD, -11, :GIT_EINVALIDSPEC, -12, :GIT_ECONFLICT, -13, :GIT_ELOCKED, -14, :GIT_EMODIFIED, -15, :GIT_EAUTH, -16, :GIT_ECERTIFICATE, -17, :GIT_EAPPLIED, -18, :GIT_EPEEL, -19, :GIT_EEOF, -20, :GIT_EINVALID, -21, :GIT_EUNCOMMITTED, -22, :GIT_EDIRECTORY, -23, :GIT_EMERGECONFLICT, -24, :GIT_PASSTHROUGH, -30, :GIT_ITEROVER, -31, :GIT_RETRY, -32, :GIT_EMISMATCH, -33]
1728
+
1729
+
1730
+ class GitError < FFI::Struct
1731
+ layout :message, :pointer, :klass, :int32
1732
+ end
1733
+
1734
+
1735
+ enum :git_error_t, [:GITERR_NONE, 0, :GITERR_NOMEMORY, 1, :GITERR_OS, 2, :GITERR_INVALID, 3, :GITERR_REFERENCE, 4, :GITERR_ZLIB, 5, :GITERR_REPOSITORY, 6, :GITERR_CONFIG, 7, :GITERR_REGEX, 8, :GITERR_ODB, 9, :GITERR_INDEX, 10, :GITERR_OBJECT, 11, :GITERR_NET, 12, :GITERR_TAG, 13, :GITERR_TREE, 14, :GITERR_INDEXER, 15, :GITERR_SSL, 16, :GITERR_SUBMODULE, 17, :GITERR_THREAD, 18, :GITERR_STASH, 19, :GITERR_CHECKOUT, 20, :GITERR_FETCHHEAD, 21, :GITERR_MERGE, 22, :GITERR_SSH, 23, :GITERR_FILTER, 24, :GITERR_REVERT, 25, :GITERR_CALLBACK, 26, :GITERR_CHERRYPICK, 27, :GITERR_DESCRIBE, 28, :GITERR_REBASE, 29, :GITERR_FILESYSTEM, 30, :GITERR_PATCH, 31, :GITERR_WORKTREE, 32, :GITERR_SHA1, 33]
1736
+
1737
+
1738
+ attach_function :giterr_last, [], :pointer
1739
+
1740
+ attach_function :giterr_clear, [], :void
1741
+
1742
+ attach_function :giterr_set_str, [:int32, :pointer], :void
1743
+
1744
+ attach_function :giterr_set_oom, [], :void
1745
+
1746
+ enum :git_filter_mode_t, [:GIT_FILTER_TO_WORKTREE, 0, :GIT_FILTER_SMUDGE, 0, :GIT_FILTER_TO_ODB, 1, :GIT_FILTER_CLEAN, 1]
1747
+
1748
+
1749
+ enum :git_filter_flag_t, [:GIT_FILTER_DEFAULT, 0, :GIT_FILTER_ALLOW_UNSAFE, 1]
1750
+
1751
+
1752
+ class GitFilter < FFI::Struct
1753
+ end
1754
+
1755
+
1756
+ class GitFilterList < FFI::Struct
1757
+ end
1758
+
1759
+
1760
+ attach_function :git_filter_list_load, [:pointer, GitRepository.by_ref, GitBlob.by_ref, :pointer, :git_filter_mode_t, :uint32], :int32
1761
+
1762
+ attach_function :git_filter_list_contains, [GitFilterList.by_ref, :pointer], :int32
1763
+
1764
+ attach_function :git_filter_list_apply_to_data, [GitBuf.by_ref, GitFilterList.by_ref, GitBuf.by_ref], :int32
1765
+
1766
+ attach_function :git_filter_list_apply_to_file, [GitBuf.by_ref, GitFilterList.by_ref, GitRepository.by_ref, :pointer], :int32
1767
+
1768
+ attach_function :git_filter_list_apply_to_blob, [GitBuf.by_ref, GitFilterList.by_ref, GitBlob.by_ref], :int32
1769
+
1770
+ attach_function :git_filter_list_stream_data, [GitFilterList.by_ref, GitBuf.by_ref, GitWritestream.by_ref], :int32
1771
+
1772
+ attach_function :git_filter_list_stream_file, [GitFilterList.by_ref, GitRepository.by_ref, :pointer, GitWritestream.by_ref], :int32
1773
+
1774
+ attach_function :git_filter_list_stream_blob, [GitFilterList.by_ref, GitBlob.by_ref, GitWritestream.by_ref], :int32
1775
+
1776
+ attach_function :git_filter_list_free, [GitFilterList.by_ref], :void
1777
+
1778
+ attach_function :git_libgit2_init, [], :int32
1779
+
1780
+ attach_function :git_libgit2_shutdown, [], :int32
1781
+
1782
+ attach_function :git_graph_ahead_behind, [:pointer, :pointer, GitRepository.by_ref, :pointer, :pointer], :int32
1783
+
1784
+ attach_function :git_graph_descendant_of, [GitRepository.by_ref, :pointer, :pointer], :int32
1785
+
1786
+ attach_function :git_ignore_add_rule, [GitRepository.by_ref, :pointer], :int32
1787
+
1788
+ attach_function :git_ignore_clear_internal_rules, [GitRepository.by_ref], :int32
1789
+
1790
+ attach_function :git_ignore_path_is_ignored, [:pointer, GitRepository.by_ref, :pointer], :int32
1791
+
1792
+ attach_function :git_message_prettify, [GitBuf.by_ref, :pointer, :int32, :int8], :int32
1793
+
1794
+ class GitMessageTrailer < FFI::Struct
1795
+ layout :key, :pointer, :value, :pointer
1796
+ end
1797
+
1798
+
1799
+ class GitMessageTrailerArray < FFI::Struct
1800
+ layout :trailers, GitMessageTrailer.by_ref, :count, :uint64, :_trailer_block, :pointer
1801
+ end
1802
+
1803
+
1804
+ attach_function :git_message_trailers, [GitMessageTrailerArray.by_ref, :pointer], :int32
1805
+
1806
+ attach_function :git_message_trailer_array_free, [GitMessageTrailerArray.by_ref], :void
1807
+
1808
+ callback :git_note_foreach_cb, [:pointer, :pointer, :pointer], :int32
1809
+
1810
+ class GitIterator < FFI::Struct
1811
+ end
1812
+
1813
+
1814
+ attach_function :git_note_iterator_new, [:pointer, GitRepository.by_ref, :pointer], :int32
1815
+
1816
+ attach_function :git_note_commit_iterator_new, [:pointer, GitCommit.by_ref], :int32
1817
+
1818
+ attach_function :git_note_iterator_free, [:pointer], :void
1819
+
1820
+ attach_function :git_note_next, [GitOid.by_ref, GitOid.by_ref, :pointer], :int32
1821
+
1822
+ attach_function :git_note_read, [:pointer, GitRepository.by_ref, :pointer, :pointer], :int32
1823
+
1824
+ attach_function :git_note_commit_read, [:pointer, GitRepository.by_ref, GitCommit.by_ref, :pointer], :int32
1825
+
1826
+ attach_function :git_note_author, [:pointer], :pointer
1827
+
1828
+ attach_function :git_note_committer, [:pointer], :pointer
1829
+
1830
+ attach_function :git_note_message, [:pointer], :pointer
1831
+
1832
+ attach_function :git_note_id, [:pointer], :pointer
1833
+
1834
+ attach_function :git_note_create, [GitOid.by_ref, GitRepository.by_ref, :pointer, :pointer, :pointer, :pointer, :pointer, :int32], :int32
1835
+
1836
+ attach_function :git_note_commit_create, [GitOid.by_ref, GitOid.by_ref, GitRepository.by_ref, GitCommit.by_ref, :pointer, :pointer, :pointer, :pointer, :int32], :int32
1837
+
1838
+ attach_function :git_note_remove, [GitRepository.by_ref, :pointer, :pointer, :pointer, :pointer], :int32
1839
+
1840
+ attach_function :git_note_commit_remove, [GitOid.by_ref, GitRepository.by_ref, GitCommit.by_ref, :pointer, :pointer, :pointer], :int32
1841
+
1842
+ attach_function :git_note_free, [GitNote.by_ref], :void
1843
+
1844
+ attach_function :git_note_default_ref, [GitBuf.by_ref, GitRepository.by_ref], :int32
1845
+
1846
+ attach_function :git_note_foreach, [GitRepository.by_ref, :pointer, :git_note_foreach_cb, :pointer], :int32
1847
+
1848
+ callback :git_odb_foreach_cb, [:pointer, :pointer], :int32
1849
+
1850
+ attach_function :git_odb_new, [:pointer], :int32
1851
+
1852
+ attach_function :git_odb_open, [:pointer, :pointer], :int32
1853
+
1854
+ attach_function :git_odb_add_disk_alternate, [GitOdb.by_ref, :pointer], :int32
1855
+
1856
+ attach_function :git_odb_free, [GitOdb.by_ref], :void
1857
+
1858
+ attach_function :git_odb_read, [:pointer, GitOdb.by_ref, :pointer], :int32
1859
+
1860
+ attach_function :git_odb_read_prefix, [:pointer, GitOdb.by_ref, :pointer, :uint64], :int32
1861
+
1862
+ attach_function :git_odb_read_header, [:pointer, :pointer, GitOdb.by_ref, :pointer], :int32
1863
+
1864
+ attach_function :git_odb_exists, [GitOdb.by_ref, :pointer], :int32
1865
+
1866
+ attach_function :git_odb_exists_prefix, [GitOid.by_ref, GitOdb.by_ref, :pointer, :uint64], :int32
1867
+
1868
+ class GitOdbExpandId < FFI::Struct
1869
+ layout :id, GitOid.by_value, :length, :uint16, :type, :git_otype
1870
+ end
1871
+
1872
+
1873
+ attach_function :git_odb_expand_ids, [GitOdb.by_ref, GitOdbExpandId.by_ref, :uint64], :int32
1874
+
1875
+ attach_function :git_odb_refresh, [GitOdb.by_ref], :int32
1876
+
1877
+ attach_function :git_odb_foreach, [GitOdb.by_ref, :git_odb_foreach_cb, :pointer], :int32
1878
+
1879
+ attach_function :git_odb_write, [GitOid.by_ref, GitOdb.by_ref, :pointer, :uint64, :git_otype], :int32
1880
+
1881
+ attach_function :git_odb_open_wstream, [:pointer, GitOdb.by_ref, :git_off_t, :git_otype], :int32
1882
+
1883
+ attach_function :git_odb_stream_write, [GitOdbStream.by_ref, :pointer, :uint64], :int32
1884
+
1885
+ attach_function :git_odb_stream_finalize_write, [GitOid.by_ref, GitOdbStream.by_ref], :int32
1886
+
1887
+ attach_function :git_odb_stream_read, [GitOdbStream.by_ref, :pointer, :uint64], :int32
1888
+
1889
+ attach_function :git_odb_stream_free, [GitOdbStream.by_ref], :void
1890
+
1891
+ attach_function :git_odb_open_rstream, [:pointer, :pointer, :pointer, GitOdb.by_ref, :pointer], :int32
1892
+
1893
+ attach_function :git_odb_write_pack, [:pointer, GitOdb.by_ref, :git_transfer_progress_cb, :pointer], :int32
1894
+
1895
+ attach_function :git_odb_hash, [GitOid.by_ref, :pointer, :uint64, :git_otype], :int32
1896
+
1897
+ attach_function :git_odb_hashfile, [GitOid.by_ref, :pointer, :git_otype], :int32
1898
+
1899
+ attach_function :git_odb_object_dup, [:pointer, GitOdbObject.by_ref], :int32
1900
+
1901
+ attach_function :git_odb_object_free, [GitOdbObject.by_ref], :void
1902
+
1903
+ attach_function :git_odb_object_id, [GitOdbObject.by_ref], :pointer
1904
+
1905
+ attach_function :git_odb_object_data, [GitOdbObject.by_ref], :pointer
1906
+
1907
+ attach_function :git_odb_object_size, [GitOdbObject.by_ref], :uint64
1908
+
1909
+ attach_function :git_odb_object_type, [GitOdbObject.by_ref], :git_otype
1910
+
1911
+ attach_function :git_odb_add_backend, [GitOdb.by_ref, GitOdbBackend.by_ref, :int32], :int32
1912
+
1913
+ attach_function :git_odb_add_alternate, [GitOdb.by_ref, GitOdbBackend.by_ref, :int32], :int32
1914
+
1915
+ attach_function :git_odb_num_backends, [GitOdb.by_ref], :uint64
1916
+
1917
+ attach_function :git_odb_get_backend, [:pointer, GitOdb.by_ref, :uint64], :int32
1918
+
1919
+ attach_function :git_odb_backend_pack, [:pointer, :pointer], :int32
1920
+
1921
+ attach_function :git_odb_backend_loose, [:pointer, :pointer, :int32, :int32, :uint32, :uint32], :int32
1922
+
1923
+ attach_function :git_odb_backend_one_pack, [:pointer, :pointer], :int32
1924
+
1925
+ enum :git_odb_stream_t, [:GIT_STREAM_RDONLY, 2, :GIT_STREAM_WRONLY, 4, :GIT_STREAM_RW, 6]
1926
+
1927
+
1928
+ class GitOdbStream < FFI::Struct
1929
+ layout :backend, GitOdbBackend.by_ref, :mode, :uint32, :hash_ctx, :pointer, :declared_size, :git_off_t, :received_bytes, :git_off_t, :read, callback([GitOdbStream.by_ref, :pointer, :uint64], :int32), :write, callback([GitOdbStream.by_ref, :pointer, :uint64], :int32), :finalize_write, callback([GitOdbStream.by_ref, :pointer], :int32), :free, callback([GitOdbStream.by_ref], :void)
1930
+ end
1931
+
1932
+ class GitOdbWritepack < FFI::Struct
1933
+ layout :backend, GitOdbBackend.by_ref, :append, callback([GitOdbWritepack.by_ref, :pointer, :uint64, GitTransferProgress.by_ref], :int32), :commit, callback([GitOdbWritepack.by_ref, GitTransferProgress.by_ref], :int32), :free, callback([GitOdbWritepack.by_ref], :void)
1934
+ end
1935
+
1936
+ class GitPatch < FFI::Struct
1937
+ end
1938
+
1939
+
1940
+ attach_function :git_patch_from_diff, [:pointer, GitDiff.by_ref, :uint64], :int32
1941
+
1942
+ attach_function :git_patch_from_blobs, [:pointer, :pointer, :pointer, :pointer, :pointer, :pointer], :int32
1943
+
1944
+ attach_function :git_patch_from_blob_and_buffer, [:pointer, :pointer, :pointer, :pointer, :uint64, :pointer, :pointer], :int32
1945
+
1946
+ attach_function :git_patch_from_buffers, [:pointer, :pointer, :uint64, :pointer, :pointer, :uint64, :pointer, :pointer], :int32
1947
+
1948
+ attach_function :git_patch_free, [GitPatch.by_ref], :void
1949
+
1950
+ attach_function :git_patch_get_delta, [:pointer], :pointer
1951
+
1952
+ attach_function :git_patch_num_hunks, [:pointer], :uint64
1953
+
1954
+ attach_function :git_patch_line_stats, [:pointer, :pointer, :pointer, :pointer], :int32
1955
+
1956
+ attach_function :git_patch_get_hunk, [:pointer, :pointer, GitPatch.by_ref, :uint64], :int32
1957
+
1958
+ attach_function :git_patch_num_lines_in_hunk, [:pointer, :uint64], :int32
1959
+
1960
+ attach_function :git_patch_get_line_in_hunk, [:pointer, GitPatch.by_ref, :uint64, :uint64], :int32
1961
+
1962
+ attach_function :git_patch_size, [GitPatch.by_ref, :int32, :int32, :int32], :uint64
1963
+
1964
+ attach_function :git_patch_print, [GitPatch.by_ref, :git_diff_line_cb, :pointer], :int32
1965
+
1966
+ attach_function :git_patch_to_buf, [GitBuf.by_ref, GitPatch.by_ref], :int32
1967
+
1968
+ class GitPathspec < FFI::Struct
1969
+ end
1970
+
1971
+
1972
+ class GitPathspecMatchList < FFI::Struct
1973
+ end
1974
+
1975
+
1976
+ enum :git_pathspec_flag_t, [:GIT_PATHSPEC_DEFAULT, 0, :GIT_PATHSPEC_IGNORE_CASE, 1, :GIT_PATHSPEC_USE_CASE, 2, :GIT_PATHSPEC_NO_GLOB, 4, :GIT_PATHSPEC_NO_MATCH_ERROR, 8, :GIT_PATHSPEC_FIND_FAILURES, 16, :GIT_PATHSPEC_FAILURES_ONLY, 32]
1977
+
1978
+
1979
+ attach_function :git_pathspec_new, [:pointer, :pointer], :int32
1980
+
1981
+ attach_function :git_pathspec_free, [GitPathspec.by_ref], :void
1982
+
1983
+ attach_function :git_pathspec_matches_path, [:pointer, :uint32, :pointer], :int32
1984
+
1985
+ attach_function :git_pathspec_match_workdir, [:pointer, GitRepository.by_ref, :uint32, GitPathspec.by_ref], :int32
1986
+
1987
+ attach_function :git_pathspec_match_index, [:pointer, GitIndex.by_ref, :uint32, GitPathspec.by_ref], :int32
1988
+
1989
+ attach_function :git_pathspec_match_tree, [:pointer, GitTree.by_ref, :uint32, GitPathspec.by_ref], :int32
1990
+
1991
+ attach_function :git_pathspec_match_diff, [:pointer, GitDiff.by_ref, :uint32, GitPathspec.by_ref], :int32
1992
+
1993
+ attach_function :git_pathspec_match_list_free, [GitPathspecMatchList.by_ref], :void
1994
+
1995
+ attach_function :git_pathspec_match_list_entrycount, [:pointer], :uint64
1996
+
1997
+ attach_function :git_pathspec_match_list_entry, [:pointer, :uint64], :pointer
1998
+
1999
+ attach_function :git_pathspec_match_list_diff_entry, [:pointer, :uint64], :pointer
2000
+
2001
+ attach_function :git_pathspec_match_list_failed_entrycount, [:pointer], :uint64
2002
+
2003
+ attach_function :git_pathspec_match_list_failed_entry, [:pointer, :uint64], :pointer
2004
+
2005
+ class GitRebaseOption < FFI::Struct
2006
+ layout :version, :uint32, :quiet, :int32, :inmemory, :int32, :rewrite_notes_ref, :pointer, :merge_options, GitMergeOption.by_value, :checkout_options, GitCheckoutOption.by_value
2007
+ end
2008
+
2009
+
2010
+ enum :git_rebase_operation_t, [:GIT_REBASE_OPERATION_PICK, 0, :GIT_REBASE_OPERATION_REWORD, 1, :GIT_REBASE_OPERATION_EDIT, 2, :GIT_REBASE_OPERATION_SQUASH, 3, :GIT_REBASE_OPERATION_FIXUP, 4, :GIT_REBASE_OPERATION_EXEC, 5]
2011
+
2012
+
2013
+ class GitRebaseOperation < FFI::Struct
2014
+ layout :type, :git_rebase_operation_t, :id, GitOid.by_value, :exec, :pointer
2015
+ end
2016
+
2017
+
2018
+ attach_function :git_rebase_init_options, [GitRebaseOption.by_ref, :uint32], :int32
2019
+
2020
+ attach_function :git_rebase_init, [:pointer, GitRepository.by_ref, :pointer, :pointer, :pointer, :pointer], :int32
2021
+
2022
+ attach_function :git_rebase_open, [:pointer, GitRepository.by_ref, :pointer], :int32
2023
+
2024
+ attach_function :git_rebase_operation_entrycount, [GitRebase.by_ref], :uint64
2025
+
2026
+ attach_function :git_rebase_operation_current, [GitRebase.by_ref], :uint64
2027
+
2028
+ attach_function :git_rebase_operation_byindex, [GitRebase.by_ref, :uint64], GitRebaseOperation.by_ref
2029
+
2030
+ attach_function :git_rebase_next, [:pointer, GitRebase.by_ref], :int32
2031
+
2032
+ attach_function :git_rebase_inmemory_index, [:pointer, GitRebase.by_ref], :int32
2033
+
2034
+ attach_function :git_rebase_commit, [GitOid.by_ref, GitRebase.by_ref, :pointer, :pointer, :pointer, :pointer], :int32
2035
+
2036
+ attach_function :git_rebase_abort, [GitRebase.by_ref], :int32
2037
+
2038
+ attach_function :git_rebase_finish, [GitRebase.by_ref, :pointer], :int32
2039
+
2040
+ attach_function :git_rebase_free, [GitRebase.by_ref], :void
2041
+
2042
+ attach_function :git_refdb_new, [:pointer, GitRepository.by_ref], :int32
2043
+
2044
+ attach_function :git_refdb_open, [:pointer, GitRepository.by_ref], :int32
2045
+
2046
+ attach_function :git_refdb_compress, [GitRefdb.by_ref], :int32
2047
+
2048
+ attach_function :git_refdb_free, [GitRefdb.by_ref], :void
2049
+
2050
+ attach_function :git_reflog_read, [:pointer, GitRepository.by_ref, :pointer], :int32
2051
+
2052
+ attach_function :git_reflog_write, [GitReflog.by_ref], :int32
2053
+
2054
+ attach_function :git_reflog_append, [GitReflog.by_ref, :pointer, :pointer, :pointer], :int32
2055
+
2056
+ attach_function :git_reflog_rename, [GitRepository.by_ref, :pointer, :pointer], :int32
2057
+
2058
+ attach_function :git_reflog_delete, [GitRepository.by_ref, :pointer], :int32
2059
+
2060
+ attach_function :git_reflog_entrycount, [GitReflog.by_ref], :uint64
2061
+
2062
+ attach_function :git_reflog_entry_byindex, [:pointer, :uint64], :pointer
2063
+
2064
+ attach_function :git_reflog_drop, [GitReflog.by_ref, :uint64, :int32], :int32
2065
+
2066
+ attach_function :git_reflog_entry_id_old, [:pointer], :pointer
2067
+
2068
+ attach_function :git_reflog_entry_id_new, [:pointer], :pointer
2069
+
2070
+ attach_function :git_reflog_entry_committer, [:pointer], :pointer
2071
+
2072
+ attach_function :git_reflog_entry_message, [:pointer], :pointer
2073
+
2074
+ attach_function :git_reflog_free, [GitReflog.by_ref], :void
2075
+
2076
+ enum :git_reset_t, [:GIT_RESET_SOFT, 1, :GIT_RESET_MIXED, 2, :GIT_RESET_HARD, 3]
2077
+
2078
+
2079
+ attach_function :git_reset, [GitRepository.by_ref, :pointer, :git_reset_t, :pointer], :int32
2080
+
2081
+ attach_function :git_reset_from_annotated, [GitRepository.by_ref, :pointer, :git_reset_t, :pointer], :int32
2082
+
2083
+ attach_function :git_reset_default, [GitRepository.by_ref, :pointer, :pointer], :int32
2084
+
2085
+ class GitRevertOption < FFI::Struct
2086
+ layout :version, :uint32, :mainline, :uint32, :merge_opts, GitMergeOption.by_value, :checkout_opts, GitCheckoutOption.by_value
2087
+ end
2088
+
2089
+
2090
+ attach_function :git_revert_init_options, [GitRevertOption.by_ref, :uint32], :int32
2091
+
2092
+ attach_function :git_revert_commit, [:pointer, GitRepository.by_ref, GitCommit.by_ref, GitCommit.by_ref, :uint32, :pointer], :int32
2093
+
2094
+ attach_function :git_revert, [GitRepository.by_ref, GitCommit.by_ref, :pointer], :int32
2095
+
2096
+ attach_function :git_revparse_single, [:pointer, GitRepository.by_ref, :pointer], :int32
2097
+
2098
+ attach_function :git_revparse_ext, [:pointer, :pointer, GitRepository.by_ref, :pointer], :int32
2099
+
2100
+ enum :git_revparse_mode_t, [:GIT_REVPARSE_SINGLE, 1, :GIT_REVPARSE_RANGE, 2, :GIT_REVPARSE_MERGE_BASE, 4]
2101
+
2102
+
2103
+ class GitRevspec < FFI::Struct
2104
+ layout :from, GitObject.by_ref, :to, GitObject.by_ref, :flags, :uint32
2105
+ end
2106
+
2107
+
2108
+ attach_function :git_revparse, [GitRevspec.by_ref, GitRepository.by_ref, :pointer], :int32
2109
+
2110
+ enum :git_sort_t, [:GIT_SORT_NONE, 0, :GIT_SORT_TOPOLOGICAL, 1, :GIT_SORT_TIME, 2, :GIT_SORT_REVERSE, 4]
2111
+
2112
+
2113
+ attach_function :git_revwalk_new, [:pointer, GitRepository.by_ref], :int32
2114
+
2115
+ attach_function :git_revwalk_reset, [GitRevwalk.by_ref], :void
2116
+
2117
+ attach_function :git_revwalk_push, [GitRevwalk.by_ref, :pointer], :int32
2118
+
2119
+ attach_function :git_revwalk_push_glob, [GitRevwalk.by_ref, :pointer], :int32
2120
+
2121
+ attach_function :git_revwalk_push_head, [GitRevwalk.by_ref], :int32
2122
+
2123
+ attach_function :git_revwalk_hide, [GitRevwalk.by_ref, :pointer], :int32
2124
+
2125
+ attach_function :git_revwalk_hide_glob, [GitRevwalk.by_ref, :pointer], :int32
2126
+
2127
+ attach_function :git_revwalk_hide_head, [GitRevwalk.by_ref], :int32
2128
+
2129
+ attach_function :git_revwalk_push_ref, [GitRevwalk.by_ref, :pointer], :int32
2130
+
2131
+ attach_function :git_revwalk_hide_ref, [GitRevwalk.by_ref, :pointer], :int32
2132
+
2133
+ attach_function :git_revwalk_next, [GitOid.by_ref, GitRevwalk.by_ref], :int32
2134
+
2135
+ attach_function :git_revwalk_sorting, [GitRevwalk.by_ref, :uint32], :void
2136
+
2137
+ attach_function :git_revwalk_push_range, [GitRevwalk.by_ref, :pointer], :int32
2138
+
2139
+ attach_function :git_revwalk_simplify_first_parent, [GitRevwalk.by_ref], :void
2140
+
2141
+ attach_function :git_revwalk_free, [GitRevwalk.by_ref], :void
2142
+
2143
+ attach_function :git_revwalk_repository, [GitRevwalk.by_ref], GitRepository.by_ref
2144
+
2145
+ callback :git_revwalk_hide_cb, [:pointer, :pointer], :int32
2146
+
2147
+ attach_function :git_revwalk_add_hide_cb, [GitRevwalk.by_ref, :git_revwalk_hide_cb, :pointer], :int32
2148
+
2149
+ attach_function :git_signature_new, [:pointer, :pointer, :pointer, :git_time_t, :int32], :int32
2150
+
2151
+ attach_function :git_signature_now, [:pointer, :pointer, :pointer], :int32
2152
+
2153
+ attach_function :git_signature_default, [:pointer, GitRepository.by_ref], :int32
2154
+
2155
+ attach_function :git_signature_from_buffer, [:pointer, :pointer], :int32
2156
+
2157
+ attach_function :git_signature_dup, [:pointer, :pointer], :int32
2158
+
2159
+ attach_function :git_signature_free, [GitSignature.by_ref], :void
2160
+
2161
+ enum :git_stash_flags, [:GIT_STASH_DEFAULT, 0, :GIT_STASH_KEEP_INDEX, 1, :GIT_STASH_INCLUDE_UNTRACKED, 2, :GIT_STASH_INCLUDE_IGNORED, 4]
2162
+
2163
+
2164
+ attach_function :git_stash_save, [GitOid.by_ref, GitRepository.by_ref, :pointer, :pointer, :uint32], :int32
2165
+
2166
+ enum :git_stash_apply_flags, [:GIT_STASH_APPLY_DEFAULT, 0, :GIT_STASH_APPLY_REINSTATE_INDEX, 1]
2167
+
2168
+
2169
+ enum :git_stash_apply_progress_t, [:GIT_STASH_APPLY_PROGRESS_NONE, 0, :GIT_STASH_APPLY_PROGRESS_LOADING_STASH, 1, :GIT_STASH_APPLY_PROGRESS_ANALYZE_INDEX, 2, :GIT_STASH_APPLY_PROGRESS_ANALYZE_MODIFIED, 3, :GIT_STASH_APPLY_PROGRESS_ANALYZE_UNTRACKED, 4, :GIT_STASH_APPLY_PROGRESS_CHECKOUT_UNTRACKED, 5, :GIT_STASH_APPLY_PROGRESS_CHECKOUT_MODIFIED, 6, :GIT_STASH_APPLY_PROGRESS_DONE, 7]
2170
+
2171
+
2172
+ callback :git_stash_apply_progress_cb, [:git_stash_apply_progress_t, :pointer], :int32
2173
+
2174
+ class GitStashApplyOption < FFI::Struct
2175
+ layout :version, :uint32, :flags, :git_stash_apply_flags, :checkout_options, GitCheckoutOption.by_value, :progress_cb, :git_stash_apply_progress_cb, :progress_payload, :pointer
2176
+ end
2177
+
2178
+
2179
+ attach_function :git_stash_apply_init_options, [GitStashApplyOption.by_ref, :uint32], :int32
2180
+
2181
+ attach_function :git_stash_apply, [GitRepository.by_ref, :uint64, :pointer], :int32
2182
+
2183
+ callback :git_stash_cb, [:uint64, :pointer, :pointer, :pointer], :int32
2184
+
2185
+ attach_function :git_stash_foreach, [GitRepository.by_ref, :git_stash_cb, :pointer], :int32
2186
+
2187
+ attach_function :git_stash_drop, [GitRepository.by_ref, :uint64], :int32
2188
+
2189
+ attach_function :git_stash_pop, [GitRepository.by_ref, :uint64, :pointer], :int32
2190
+
2191
+ enum :git_status_t, [:GIT_STATUS_CURRENT, 0, :GIT_STATUS_INDEX_NEW, 1, :GIT_STATUS_INDEX_MODIFIED, 2, :GIT_STATUS_INDEX_DELETED, 4, :GIT_STATUS_INDEX_RENAMED, 8, :GIT_STATUS_INDEX_TYPECHANGE, 16, :GIT_STATUS_WT_NEW, 128, :GIT_STATUS_WT_MODIFIED, 256, :GIT_STATUS_WT_DELETED, 512, :GIT_STATUS_WT_TYPECHANGE, 1024, :GIT_STATUS_WT_RENAMED, 2048, :GIT_STATUS_WT_UNREADABLE, 4096, :GIT_STATUS_IGNORED, 16384, :GIT_STATUS_CONFLICTED, 32768]
2192
+
2193
+
2194
+ callback :git_status_cb, [:pointer, :uint32, :pointer], :int32
2195
+
2196
+ enum :git_status_show_t, [:GIT_STATUS_SHOW_INDEX_AND_WORKDIR, 0, :GIT_STATUS_SHOW_INDEX_ONLY, 1, :GIT_STATUS_SHOW_WORKDIR_ONLY, 2]
2197
+
2198
+
2199
+ enum :git_status_opt_t, [:GIT_STATUS_OPT_INCLUDE_UNTRACKED, 1, :GIT_STATUS_OPT_INCLUDE_IGNORED, 2, :GIT_STATUS_OPT_INCLUDE_UNMODIFIED, 4, :GIT_STATUS_OPT_EXCLUDE_SUBMODULES, 8, :GIT_STATUS_OPT_RECURSE_UNTRACKED_DIRS, 16, :GIT_STATUS_OPT_DISABLE_PATHSPEC_MATCH, 32, :GIT_STATUS_OPT_RECURSE_IGNORED_DIRS, 64, :GIT_STATUS_OPT_RENAMES_HEAD_TO_INDEX, 128, :GIT_STATUS_OPT_RENAMES_INDEX_TO_WORKDIR, 256, :GIT_STATUS_OPT_SORT_CASE_SENSITIVELY, 512, :GIT_STATUS_OPT_SORT_CASE_INSENSITIVELY, 1024, :GIT_STATUS_OPT_RENAMES_FROM_REWRITES, 2048, :GIT_STATUS_OPT_NO_REFRESH, 4096, :GIT_STATUS_OPT_UPDATE_INDEX, 8192, :GIT_STATUS_OPT_INCLUDE_UNREADABLE, 16384, :GIT_STATUS_OPT_INCLUDE_UNREADABLE_AS_UNTRACKED, 32768]
2200
+
2201
+
2202
+ class GitStatusOption < FFI::Struct
2203
+ layout :version, :uint32, :show, :git_status_show_t, :flags, :uint32, :pathspec, GitStrarray.by_value, :baseline, GitTree.by_ref
2204
+ end
2205
+
2206
+
2207
+ attach_function :git_status_init_options, [GitStatusOption.by_ref, :uint32], :int32
2208
+
2209
+ class GitStatusEntry < FFI::Struct
2210
+ layout :status, :git_status_t, :head_to_index, GitDiffDeltum.by_ref, :index_to_workdir, GitDiffDeltum.by_ref
2211
+ end
2212
+
2213
+
2214
+ attach_function :git_status_foreach, [GitRepository.by_ref, :git_status_cb, :pointer], :int32
2215
+
2216
+ attach_function :git_status_foreach_ext, [GitRepository.by_ref, :pointer, :git_status_cb, :pointer], :int32
2217
+
2218
+ attach_function :git_status_file, [:pointer, GitRepository.by_ref, :pointer], :int32
2219
+
2220
+ attach_function :git_status_list_new, [:pointer, GitRepository.by_ref, :pointer], :int32
2221
+
2222
+ attach_function :git_status_list_entrycount, [GitStatusList.by_ref], :uint64
2223
+
2224
+ attach_function :git_status_byindex, [GitStatusList.by_ref, :uint64], :pointer
2225
+
2226
+ attach_function :git_status_list_free, [GitStatusList.by_ref], :void
2227
+
2228
+ attach_function :git_status_should_ignore, [:pointer, GitRepository.by_ref, :pointer], :int32
2229
+
2230
+ enum :git_submodule_status_t, [:GIT_SUBMODULE_STATUS_IN_HEAD, 1, :GIT_SUBMODULE_STATUS_IN_INDEX, 2, :GIT_SUBMODULE_STATUS_IN_CONFIG, 4, :GIT_SUBMODULE_STATUS_IN_WD, 8, :GIT_SUBMODULE_STATUS_INDEX_ADDED, 16, :GIT_SUBMODULE_STATUS_INDEX_DELETED, 32, :GIT_SUBMODULE_STATUS_INDEX_MODIFIED, 64, :GIT_SUBMODULE_STATUS_WD_UNINITIALIZED, 128, :GIT_SUBMODULE_STATUS_WD_ADDED, 256, :GIT_SUBMODULE_STATUS_WD_DELETED, 512, :GIT_SUBMODULE_STATUS_WD_MODIFIED, 1024, :GIT_SUBMODULE_STATUS_WD_INDEX_MODIFIED, 2048, :GIT_SUBMODULE_STATUS_WD_WD_MODIFIED, 4096, :GIT_SUBMODULE_STATUS_WD_UNTRACKED, 8192]
2231
+
2232
+
2233
+ callback :git_submodule_cb, [GitSubmodule.by_ref, :pointer, :pointer], :int32
2234
+
2235
+ class GitSubmoduleUpdateOption < FFI::Struct
2236
+ layout :version, :uint32, :checkout_opts, GitCheckoutOption.by_value, :fetch_opts, GitFetchOption.by_value, :allow_fetch, :int32
2237
+ end
2238
+
2239
+
2240
+ attach_function :git_submodule_update_init_options, [GitSubmoduleUpdateOption.by_ref, :uint32], :int32
2241
+
2242
+ attach_function :git_submodule_update, [GitSubmodule.by_ref, :int32, GitSubmoduleUpdateOption.by_ref], :int32
2243
+
2244
+ attach_function :git_submodule_lookup, [:pointer, GitRepository.by_ref, :pointer], :int32
2245
+
2246
+ attach_function :git_submodule_free, [GitSubmodule.by_ref], :void
2247
+
2248
+ attach_function :git_submodule_foreach, [GitRepository.by_ref, :git_submodule_cb, :pointer], :int32
2249
+
2250
+ attach_function :git_submodule_add_setup, [:pointer, GitRepository.by_ref, :pointer, :pointer, :int32], :int32
2251
+
2252
+ attach_function :git_submodule_add_finalize, [GitSubmodule.by_ref], :int32
2253
+
2254
+ attach_function :git_submodule_add_to_index, [GitSubmodule.by_ref, :int32], :int32
2255
+
2256
+ attach_function :git_submodule_owner, [GitSubmodule.by_ref], GitRepository.by_ref
2257
+
2258
+ attach_function :git_submodule_name, [GitSubmodule.by_ref], :pointer
2259
+
2260
+ attach_function :git_submodule_path, [GitSubmodule.by_ref], :pointer
2261
+
2262
+ attach_function :git_submodule_url, [GitSubmodule.by_ref], :pointer
2263
+
2264
+ attach_function :git_submodule_resolve_url, [GitBuf.by_ref, GitRepository.by_ref, :pointer], :int32
2265
+
2266
+ attach_function :git_submodule_branch, [GitSubmodule.by_ref], :pointer
2267
+
2268
+ attach_function :git_submodule_set_branch, [GitRepository.by_ref, :pointer, :pointer], :int32
2269
+
2270
+ attach_function :git_submodule_set_url, [GitRepository.by_ref, :pointer, :pointer], :int32
2271
+
2272
+ attach_function :git_submodule_index_id, [GitSubmodule.by_ref], :pointer
2273
+
2274
+ attach_function :git_submodule_head_id, [GitSubmodule.by_ref], :pointer
2275
+
2276
+ attach_function :git_submodule_wd_id, [GitSubmodule.by_ref], :pointer
2277
+
2278
+ attach_function :git_submodule_ignore, [GitSubmodule.by_ref], :git_submodule_ignore_t
2279
+
2280
+ attach_function :git_submodule_set_ignore, [GitRepository.by_ref, :pointer, :git_submodule_ignore_t], :int32
2281
+
2282
+ attach_function :git_submodule_update_strategy, [GitSubmodule.by_ref], :git_submodule_update_t
2283
+
2284
+ attach_function :git_submodule_set_update, [GitRepository.by_ref, :pointer, :git_submodule_update_t], :int32
2285
+
2286
+ attach_function :git_submodule_fetch_recurse_submodules, [GitSubmodule.by_ref], :git_submodule_recurse_t
2287
+
2288
+ attach_function :git_submodule_set_fetch_recurse_submodules, [GitRepository.by_ref, :pointer, :git_submodule_recurse_t], :int32
2289
+
2290
+ attach_function :git_submodule_init, [GitSubmodule.by_ref, :int32], :int32
2291
+
2292
+ attach_function :git_submodule_repo_init, [:pointer, :pointer, :int32], :int32
2293
+
2294
+ attach_function :git_submodule_sync, [GitSubmodule.by_ref], :int32
2295
+
2296
+ attach_function :git_submodule_open, [:pointer, GitSubmodule.by_ref], :int32
2297
+
2298
+ attach_function :git_submodule_reload, [GitSubmodule.by_ref, :int32], :int32
2299
+
2300
+ attach_function :git_submodule_status, [:pointer, GitRepository.by_ref, :pointer, :git_submodule_ignore_t], :int32
2301
+
2302
+ attach_function :git_submodule_location, [:pointer, GitSubmodule.by_ref], :int32
2303
+
2304
+ attach_function :git_tag_lookup, [:pointer, GitRepository.by_ref, :pointer], :int32
2305
+
2306
+ attach_function :git_tag_lookup_prefix, [:pointer, GitRepository.by_ref, :pointer, :uint64], :int32
2307
+
2308
+ attach_function :git_tag_free, [GitTag.by_ref], :void
2309
+
2310
+ attach_function :git_tag_id, [:pointer], :pointer
2311
+
2312
+ attach_function :git_tag_owner, [:pointer], GitRepository.by_ref
2313
+
2314
+ attach_function :git_tag_target, [:pointer, :pointer], :int32
2315
+
2316
+ attach_function :git_tag_target_id, [:pointer], :pointer
2317
+
2318
+ attach_function :git_tag_target_type, [:pointer], :git_otype
2319
+
2320
+ attach_function :git_tag_name, [:pointer], :pointer
2321
+
2322
+ attach_function :git_tag_tagger, [:pointer], :pointer
2323
+
2324
+ attach_function :git_tag_message, [:pointer], :pointer
2325
+
2326
+ attach_function :git_tag_create, [GitOid.by_ref, GitRepository.by_ref, :pointer, :pointer, :pointer, :pointer, :int32], :int32
2327
+
2328
+ attach_function :git_tag_annotation_create, [GitOid.by_ref, GitRepository.by_ref, :pointer, :pointer, :pointer, :pointer], :int32
2329
+
2330
+ attach_function :git_tag_create_frombuffer, [GitOid.by_ref, GitRepository.by_ref, :pointer, :int32], :int32
2331
+
2332
+ attach_function :git_tag_create_lightweight, [GitOid.by_ref, GitRepository.by_ref, :pointer, :pointer, :int32], :int32
2333
+
2334
+ attach_function :git_tag_delete, [GitRepository.by_ref, :pointer], :int32
2335
+
2336
+ attach_function :git_tag_list, [GitStrarray.by_ref, GitRepository.by_ref], :int32
2337
+
2338
+ attach_function :git_tag_list_match, [GitStrarray.by_ref, :pointer, GitRepository.by_ref], :int32
2339
+
2340
+ callback :git_tag_foreach_cb, [:pointer, GitOid.by_ref, :pointer], :int32
2341
+
2342
+ attach_function :git_tag_foreach, [GitRepository.by_ref, :git_tag_foreach_cb, :pointer], :int32
2343
+
2344
+ attach_function :git_tag_peel, [:pointer, :pointer], :int32
2345
+
2346
+ attach_function :git_tag_dup, [:pointer, GitTag.by_ref], :int32
2347
+
2348
+ attach_function :git_transaction_new, [:pointer, GitRepository.by_ref], :int32
2349
+
2350
+ attach_function :git_transaction_lock_ref, [GitTransaction.by_ref, :pointer], :int32
2351
+
2352
+ attach_function :git_transaction_set_target, [GitTransaction.by_ref, :pointer, :pointer, :pointer, :pointer], :int32
2353
+
2354
+ attach_function :git_transaction_set_symbolic_target, [GitTransaction.by_ref, :pointer, :pointer, :pointer, :pointer], :int32
2355
+
2356
+ attach_function :git_transaction_set_reflog, [GitTransaction.by_ref, :pointer, :pointer], :int32
2357
+
2358
+ attach_function :git_transaction_remove, [GitTransaction.by_ref, :pointer], :int32
2359
+
2360
+ attach_function :git_transaction_commit, [GitTransaction.by_ref], :int32
2361
+
2362
+ attach_function :git_transaction_free, [GitTransaction.by_ref], :void
2363
+
2364
+ attach_function :git_worktree_list, [GitStrarray.by_ref, GitRepository.by_ref], :int32
2365
+
2366
+ attach_function :git_worktree_lookup, [:pointer, GitRepository.by_ref, :pointer], :int32
2367
+
2368
+ attach_function :git_worktree_open_from_repository, [:pointer, GitRepository.by_ref], :int32
2369
+
2370
+ attach_function :git_worktree_free, [GitWorktree.by_ref], :void
2371
+
2372
+ attach_function :git_worktree_validate, [:pointer], :int32
2373
+
2374
+ class GitWorktreeAddOption < FFI::Struct
2375
+ layout :version, :uint32, :lock, :int32
2376
+ end
2377
+
2378
+
2379
+ attach_function :git_worktree_add_init_options, [GitWorktreeAddOption.by_ref, :uint32], :int32
2380
+
2381
+ attach_function :git_worktree_add, [:pointer, GitRepository.by_ref, :pointer, :pointer, :pointer], :int32
2382
+
2383
+ attach_function :git_worktree_lock, [GitWorktree.by_ref, :pointer], :int32
2384
+
2385
+ attach_function :git_worktree_unlock, [GitWorktree.by_ref], :int32
2386
+
2387
+ attach_function :git_worktree_is_locked, [GitBuf.by_ref, :pointer], :int32
2388
+
2389
+ enum :git_worktree_prune_t, [:GIT_WORKTREE_PRUNE_VALID, 1, :GIT_WORKTREE_PRUNE_LOCKED, 2, :GIT_WORKTREE_PRUNE_WORKING_TREE, 4]
2390
+
2391
+
2392
+ class GitWorktreePruneOption < FFI::Struct
2393
+ layout :version, :uint32, :flags, :uint32
2394
+ end
2395
+
2396
+
2397
+ attach_function :git_worktree_prune_init_options, [GitWorktreePruneOption.by_ref, :uint32], :int32
2398
+
2399
+ attach_function :git_worktree_is_prunable, [GitWorktree.by_ref, GitWorktreePruneOption.by_ref], :int32
2400
+
2401
+ attach_function :git_worktree_prune, [GitWorktree.by_ref, GitWorktreePruneOption.by_ref], :int32
2402
+ end