1 #![doc(html_root_url = "https://docs.rs/libgit2-sys/0.14")]
2 #![allow(non_camel_case_types, unused_extern_crates)]
4 // This is required to link libz when libssh2-sys is not included.
5 extern crate libz_sys
as libz
;
7 use libc
::{c_char, c_int, c_uchar, c_uint, c_void, size_t}
;
8 #[cfg(feature = "ssh")]
9 use libssh2_sys
as libssh2
;
12 pub const GIT_OID_RAWSZ
: usize = 20;
13 pub const GIT_OID_HEXSZ
: usize = GIT_OID_RAWSZ
* 2;
14 pub const GIT_CLONE_OPTIONS_VERSION
: c_uint
= 1;
15 pub const GIT_STASH_APPLY_OPTIONS_VERSION
: c_uint
= 1;
16 pub const GIT_CHECKOUT_OPTIONS_VERSION
: c_uint
= 1;
17 pub const GIT_MERGE_OPTIONS_VERSION
: c_uint
= 1;
18 pub const GIT_REMOTE_CALLBACKS_VERSION
: c_uint
= 1;
19 pub const GIT_STATUS_OPTIONS_VERSION
: c_uint
= 1;
20 pub const GIT_BLAME_OPTIONS_VERSION
: c_uint
= 1;
21 pub const GIT_PROXY_OPTIONS_VERSION
: c_uint
= 1;
22 pub const GIT_SUBMODULE_UPDATE_OPTIONS_VERSION
: c_uint
= 1;
23 pub const GIT_ODB_BACKEND_VERSION
: c_uint
= 1;
24 pub const GIT_REFDB_BACKEND_VERSION
: c_uint
= 1;
25 pub const GIT_CHERRYPICK_OPTIONS_VERSION
: c_uint
= 1;
26 pub const GIT_APPLY_OPTIONS_VERSION
: c_uint
= 1;
27 pub const GIT_REVERT_OPTIONS_VERSION
: c_uint
= 1;
29 macro_rules
! git_enum
{
30 (pub enum $name
:ident { $($variants:tt)* }
) => {
31 #[cfg(target_env = "msvc")]
33 #[cfg(not(target_env = "msvc"))]
35 git_enum
!(gen
, $name
, 0, $
($variants
)*);
37 (pub enum $name
:ident
: $t
:ty { $($variants:tt)* }
) => {
39 git_enum
!(gen
, $name
, 0, $
($variants
)*);
41 (gen
, $name
:ident
, $val
:expr
, $variant
:ident
, $
($rest
:tt
)*) => {
42 pub const $variant
: $name
= $val
;
43 git_enum
!(gen
, $name
, $val
+1, $
($rest
)*);
45 (gen
, $name
:ident
, $val
:expr
, $variant
:ident
= $e
:expr
, $
($rest
:tt
)*) => {
46 pub const $variant
: $name
= $e
;
47 git_enum
!(gen
, $name
, $e
+1, $
($rest
)*);
49 (gen
, $name
:ident
, $val
:expr
, ) => {}
53 pub enum git_branch_iterator {}
55 pub enum git_commit {}
56 pub enum git_config {}
57 pub enum git_config_iterator {}
59 pub enum git_index_conflict_iterator {}
60 pub enum git_object {}
61 pub enum git_reference {}
62 pub enum git_reference_iterator {}
63 pub enum git_annotated_commit {}
65 pub enum git_refspec {}
66 pub enum git_remote {}
67 pub enum git_repository {}
68 pub enum git_revwalk {}
69 pub enum git_submodule {}
72 pub enum git_tree_entry {}
73 pub enum git_treebuilder {}
76 pub enum git_note_iterator {}
77 pub enum git_status_list {}
78 pub enum git_pathspec {}
79 pub enum git_pathspec_match_list {}
81 pub enum git_diff_stats {}
83 pub enum git_rebase {}
84 pub enum git_reflog {}
85 pub enum git_reflog_entry {}
86 pub enum git_describe_result {}
87 pub enum git_packbuilder {}
89 pub enum git_odb_stream {}
90 pub enum git_odb_object {}
91 pub enum git_worktree {}
92 pub enum git_transaction {}
93 pub enum git_mailmap {}
96 pub struct git_revspec
{
97 pub from
: *mut git_object
,
98 pub to
: *mut git_object
,
103 pub struct git_error
{
104 pub message
: *mut c_char
,
109 #[derive(Copy, Clone)]
111 pub id
: [u8; GIT_OID_RAWSZ
],
116 pub struct git_strarray
{
117 pub strings
: *mut *mut c_char
,
120 impl Clone
for git_strarray
{
121 fn clone(&self) -> git_strarray
{
128 pub struct git_oidarray
{
129 pub ids
: *mut git_oid
,
132 impl Clone
for git_oidarray
{
133 fn clone(&self) -> git_oidarray
{
139 pub struct git_signature
{
140 pub name
: *mut c_char
,
141 pub email
: *mut c_char
,
146 #[derive(Copy, Clone, Debug, Eq, PartialEq)]
147 pub struct git_time
{
148 pub time
: git_time_t
,
153 pub type git_off_t
= i64;
154 pub type git_time_t
= i64;
155 pub type git_object_size_t
= u64;
158 pub enum git_revparse_mode_t
{
159 GIT_REVPARSE_SINGLE
= 1 << 0,
160 GIT_REVPARSE_RANGE
= 1 << 1,
161 GIT_REVPARSE_MERGE_BASE
= 1 << 2,
166 pub enum git_error_code
: c_int
{
176 GIT_EUNBORNBRANCH
= -9,
178 GIT_ENONFASTFORWARD
= -11,
179 GIT_EINVALIDSPEC
= -12,
184 GIT_ECERTIFICATE
= -17,
189 GIT_EUNCOMMITTED
= -22,
190 GIT_EDIRECTORY
= -23,
191 GIT_EMERGECONFLICT
= -24,
192 GIT_PASSTHROUGH
= -30,
196 GIT_EINDEXDIRTY
= -34,
197 GIT_EAPPLYFAIL
= -35,
203 pub enum git_error_t
{
210 GIT_ERROR_REPOSITORY
,
231 GIT_ERROR_CHERRYPICK
,
234 GIT_ERROR_FILESYSTEM
,
243 pub enum git_repository_state_t
{
244 GIT_REPOSITORY_STATE_NONE
,
245 GIT_REPOSITORY_STATE_MERGE
,
246 GIT_REPOSITORY_STATE_REVERT
,
247 GIT_REPOSITORY_STATE_REVERT_SEQUENCE
,
248 GIT_REPOSITORY_STATE_CHERRYPICK
,
249 GIT_REPOSITORY_STATE_CHERRYPICK_SEQUENCE
,
250 GIT_REPOSITORY_STATE_BISECT
,
251 GIT_REPOSITORY_STATE_REBASE
,
252 GIT_REPOSITORY_STATE_REBASE_INTERACTIVE
,
253 GIT_REPOSITORY_STATE_REBASE_MERGE
,
254 GIT_REPOSITORY_STATE_APPLY_MAILBOX
,
255 GIT_REPOSITORY_STATE_APPLY_MAILBOX_OR_REBASE
,
260 pub enum git_direction
{
267 pub struct git_clone_options
{
269 pub checkout_opts
: git_checkout_options
,
270 pub fetch_opts
: git_fetch_options
,
272 pub local
: git_clone_local_t
,
273 pub checkout_branch
: *const c_char
,
274 pub repository_cb
: git_repository_create_cb
,
275 pub repository_cb_payload
: *mut c_void
,
276 pub remote_cb
: git_remote_create_cb
,
277 pub remote_cb_payload
: *mut c_void
,
281 pub enum git_clone_local_t
{
282 GIT_CLONE_LOCAL_AUTO
,
285 GIT_CLONE_LOCAL_NO_LINKS
,
290 pub struct git_checkout_options
{
292 pub checkout_strategy
: c_uint
,
293 pub disable_filters
: c_int
,
294 pub dir_mode
: c_uint
,
295 pub file_mode
: c_uint
,
296 pub file_open_flags
: c_int
,
297 pub notify_flags
: c_uint
,
298 pub notify_cb
: git_checkout_notify_cb
,
299 pub notify_payload
: *mut c_void
,
300 pub progress_cb
: git_checkout_progress_cb
,
301 pub progress_payload
: *mut c_void
,
302 pub paths
: git_strarray
,
303 pub baseline
: *mut git_tree
,
304 pub baseline_index
: *mut git_index
,
305 pub target_directory
: *const c_char
,
306 pub ancestor_label
: *const c_char
,
307 pub our_label
: *const c_char
,
308 pub their_label
: *const c_char
,
309 pub perfdata_cb
: git_checkout_perfdata_cb
,
310 pub perfdata_payload
: *mut c_void
,
313 pub type git_checkout_notify_cb
= Option
<
315 git_checkout_notify_t
,
317 *const git_diff_file
,
318 *const git_diff_file
,
319 *const git_diff_file
,
323 pub type git_checkout_progress_cb
=
324 Option
<extern "C" fn(*const c_char
, size_t
, size_t
, *mut c_void
)>;
326 pub type git_checkout_perfdata_cb
=
327 Option
<extern "C" fn(*const git_checkout_perfdata
, *mut c_void
)>;
330 pub struct git_checkout_perfdata
{
331 pub mkdir_calls
: size_t
,
332 pub stat_calls
: size_t
,
333 pub chmod_calls
: size_t
,
337 #[derive(Copy, Clone)]
338 pub struct git_indexer_progress
{
339 pub total_objects
: c_uint
,
340 pub indexed_objects
: c_uint
,
341 pub received_objects
: c_uint
,
342 pub local_objects
: c_uint
,
343 pub total_deltas
: c_uint
,
344 pub indexed_deltas
: c_uint
,
345 pub received_bytes
: size_t
,
348 pub type git_indexer_progress_cb
=
349 Option
<extern "C" fn(*const git_indexer_progress
, *mut c_void
) -> c_int
>;
353 note
= "renamed to `git_indexer_progress` to match upstream"
355 pub type git_transfer_progress
= git_indexer_progress
;
357 pub type git_remote_ready_cb
= Option
<extern "C" fn(*mut git_remote
, c_int
, *mut c_void
) -> c_int
>;
360 pub struct git_remote_callbacks
{
362 pub sideband_progress
: git_transport_message_cb
,
363 pub completion
: Option
<extern "C" fn(git_remote_completion_type
, *mut c_void
) -> c_int
>,
364 pub credentials
: git_cred_acquire_cb
,
365 pub certificate_check
: git_transport_certificate_check_cb
,
366 pub transfer_progress
: git_indexer_progress_cb
,
368 Option
<extern "C" fn(*const c_char
, *const git_oid
, *const git_oid
, *mut c_void
) -> c_int
>,
369 pub pack_progress
: git_packbuilder_progress
,
370 pub push_transfer_progress
: git_push_transfer_progress
,
371 pub push_update_reference
: git_push_update_reference_cb
,
372 pub push_negotiation
: git_push_negotiation
,
373 pub transport
: git_transport_cb
,
374 pub remote_ready
: git_remote_ready_cb
,
375 pub payload
: *mut c_void
,
376 pub resolve_url
: git_url_resolve_cb
,
380 pub struct git_fetch_options
{
382 pub callbacks
: git_remote_callbacks
,
383 pub prune
: git_fetch_prune_t
,
384 pub update_fetchhead
: c_int
,
385 pub download_tags
: git_remote_autotag_option_t
,
386 pub proxy_opts
: git_proxy_options
,
387 pub follow_redirects
: git_remote_redirect_t
,
388 pub custom_headers
: git_strarray
,
392 pub enum git_remote_autotag_option_t
{
393 GIT_REMOTE_DOWNLOAD_TAGS_UNSPECIFIED
,
394 GIT_REMOTE_DOWNLOAD_TAGS_AUTO
,
395 GIT_REMOTE_DOWNLOAD_TAGS_NONE
,
396 GIT_REMOTE_DOWNLOAD_TAGS_ALL
,
401 pub enum git_fetch_prune_t
{
402 GIT_FETCH_PRUNE_UNSPECIFIED
,
409 pub enum git_remote_completion_type
{
410 GIT_REMOTE_COMPLETION_DOWNLOAD
,
411 GIT_REMOTE_COMPLETION_INDEXING
,
412 GIT_REMOTE_COMPLETION_ERROR
,
416 pub type git_transport_message_cb
=
417 Option
<extern "C" fn(*const c_char
, c_int
, *mut c_void
) -> c_int
>;
418 pub type git_cred_acquire_cb
= Option
<
419 extern "C" fn(*mut *mut git_cred
, *const c_char
, *const c_char
, c_uint
, *mut c_void
) -> c_int
,
421 pub type git_transfer_progress_cb
=
422 Option
<extern "C" fn(*const git_indexer_progress
, *mut c_void
) -> c_int
>;
423 pub type git_packbuilder_progress
=
424 Option
<extern "C" fn(git_packbuilder_stage_t
, c_uint
, c_uint
, *mut c_void
) -> c_int
>;
425 pub type git_push_transfer_progress
=
426 Option
<extern "C" fn(c_uint
, c_uint
, size_t
, *mut c_void
) -> c_int
>;
427 pub type git_transport_certificate_check_cb
=
428 Option
<extern "C" fn(*mut git_cert
, c_int
, *const c_char
, *mut c_void
) -> c_int
>;
429 pub type git_push_negotiation
=
430 Option
<extern "C" fn(*mut *const git_push_update
, size_t
, *mut c_void
) -> c_int
>;
432 pub type git_push_update_reference_cb
=
433 Option
<extern "C" fn(*const c_char
, *const c_char
, *mut c_void
) -> c_int
>;
434 pub type git_url_resolve_cb
=
435 Option
<extern "C" fn(*mut git_buf
, *const c_char
, c_int
, *mut c_void
) -> c_int
>;
438 pub struct git_push_update
{
439 pub src_refname
: *mut c_char
,
440 pub dst_refname
: *mut c_char
,
446 pub enum git_cert_t
{
449 GIT_CERT_HOSTKEY_LIBSSH2
,
455 pub struct git_cert
{
456 pub cert_type
: git_cert_t
,
460 pub struct git_cert_hostkey
{
461 pub parent
: git_cert
,
462 pub kind
: git_cert_ssh_t
,
463 pub hash_md5
: [u8; 16],
464 pub hash_sha1
: [u8; 20],
465 pub hash_sha256
: [u8; 32],
466 pub raw_type
: git_cert_ssh_raw_type_t
,
467 pub hostkey
: *const c_char
,
468 pub hostkey_len
: size_t
,
472 pub struct git_cert_x509
{
473 pub parent
: git_cert
,
474 pub data
: *mut c_void
,
479 pub enum git_cert_ssh_t
{
480 GIT_CERT_SSH_MD5
= 1 << 0,
481 GIT_CERT_SSH_SHA1
= 1 << 1,
482 GIT_CERT_SSH_SHA256
= 1 << 2,
483 GIT_CERT_SSH_RAW
= 1 << 3,
488 pub enum git_cert_ssh_raw_type_t
{
489 GIT_CERT_SSH_RAW_TYPE_UNKNOWN
= 0,
490 GIT_CERT_SSH_RAW_TYPE_RSA
= 1,
491 GIT_CERT_SSH_RAW_TYPE_DSS
= 2,
496 pub enum git_diff_flag_t
{
497 GIT_DIFF_FLAG_BINARY
= 1 << 0,
498 GIT_DIFF_FLAG_NOT_BINARY
= 1 << 1,
499 GIT_DIFF_FLAG_VALID_ID
= 1 << 2,
500 GIT_DIFF_FLAG_EXISTS
= 1 << 3,
505 pub struct git_diff_file
{
507 pub path
: *const c_char
,
508 pub size
: git_object_size_t
,
514 pub type git_repository_create_cb
=
515 Option
<extern "C" fn(*mut *mut git_repository
, *const c_char
, c_int
, *mut c_void
) -> c_int
>;
516 pub type git_remote_create_cb
= Option
<
518 *mut *mut git_remote
,
527 pub enum git_checkout_notify_t
{
528 GIT_CHECKOUT_NOTIFY_NONE
= 0,
529 GIT_CHECKOUT_NOTIFY_CONFLICT
= 1 << 0,
530 GIT_CHECKOUT_NOTIFY_DIRTY
= 1 << 1,
531 GIT_CHECKOUT_NOTIFY_UPDATED
= 1 << 2,
532 GIT_CHECKOUT_NOTIFY_UNTRACKED
= 1 << 3,
533 GIT_CHECKOUT_NOTIFY_IGNORED
= 1 << 4,
535 GIT_CHECKOUT_NOTIFY_ALL
= 0x0FFFF,
540 pub enum git_status_t
{
541 GIT_STATUS_CURRENT
= 0,
543 GIT_STATUS_INDEX_NEW
= 1 << 0,
544 GIT_STATUS_INDEX_MODIFIED
= 1 << 1,
545 GIT_STATUS_INDEX_DELETED
= 1 << 2,
546 GIT_STATUS_INDEX_RENAMED
= 1 << 3,
547 GIT_STATUS_INDEX_TYPECHANGE
= 1 << 4,
549 GIT_STATUS_WT_NEW
= 1 << 7,
550 GIT_STATUS_WT_MODIFIED
= 1 << 8,
551 GIT_STATUS_WT_DELETED
= 1 << 9,
552 GIT_STATUS_WT_TYPECHANGE
= 1 << 10,
553 GIT_STATUS_WT_RENAMED
= 1 << 11,
554 GIT_STATUS_WT_UNREADABLE
= 1 << 12,
556 GIT_STATUS_IGNORED
= 1 << 14,
557 GIT_STATUS_CONFLICTED
= 1 << 15,
562 pub enum git_status_opt_t
{
563 GIT_STATUS_OPT_INCLUDE_UNTRACKED
= 1 << 0,
564 GIT_STATUS_OPT_INCLUDE_IGNORED
= 1 << 1,
565 GIT_STATUS_OPT_INCLUDE_UNMODIFIED
= 1 << 2,
566 GIT_STATUS_OPT_EXCLUDE_SUBMODULES
= 1 << 3,
567 GIT_STATUS_OPT_RECURSE_UNTRACKED_DIRS
= 1 << 4,
568 GIT_STATUS_OPT_DISABLE_PATHSPEC_MATCH
= 1 << 5,
569 GIT_STATUS_OPT_RECURSE_IGNORED_DIRS
= 1 << 6,
570 GIT_STATUS_OPT_RENAMES_HEAD_TO_INDEX
= 1 << 7,
571 GIT_STATUS_OPT_RENAMES_INDEX_TO_WORKDIR
= 1 << 8,
572 GIT_STATUS_OPT_SORT_CASE_SENSITIVELY
= 1 << 9,
573 GIT_STATUS_OPT_SORT_CASE_INSENSITIVELY
= 1 << 10,
575 GIT_STATUS_OPT_RENAMES_FROM_REWRITES
= 1 << 11,
576 GIT_STATUS_OPT_NO_REFRESH
= 1 << 12,
577 GIT_STATUS_OPT_UPDATE_INDEX
= 1 << 13,
578 GIT_STATUS_OPT_INCLUDE_UNREADABLE
= 1 << 14,
579 GIT_STATUS_OPT_INCLUDE_UNREADABLE_AS_UNTRACKED
= 1 << 15,
584 pub enum git_status_show_t
{
585 GIT_STATUS_SHOW_INDEX_AND_WORKDIR
= 0,
586 GIT_STATUS_SHOW_INDEX_ONLY
= 1,
587 GIT_STATUS_SHOW_WORKDIR_ONLY
= 2,
592 pub enum git_delta_t
{
593 GIT_DELTA_UNMODIFIED
,
601 GIT_DELTA_TYPECHANGE
,
602 GIT_DELTA_UNREADABLE
,
603 GIT_DELTA_CONFLICTED
,
608 pub struct git_status_options
{
610 pub show
: git_status_show_t
,
612 pub pathspec
: git_strarray
,
613 pub baseline
: *mut git_tree
,
614 pub rename_threshold
: u16,
618 pub struct git_diff_delta
{
619 pub status
: git_delta_t
,
623 pub old_file
: git_diff_file
,
624 pub new_file
: git_diff_file
,
628 pub struct git_status_entry
{
629 pub status
: git_status_t
,
630 pub head_to_index
: *mut git_diff_delta
,
631 pub index_to_workdir
: *mut git_diff_delta
,
635 pub enum git_checkout_strategy_t
{
636 GIT_CHECKOUT_NONE
= 0,
637 GIT_CHECKOUT_SAFE
= 1 << 0,
638 GIT_CHECKOUT_FORCE
= 1 << 1,
639 GIT_CHECKOUT_RECREATE_MISSING
= 1 << 2,
640 GIT_CHECKOUT_ALLOW_CONFLICTS
= 1 << 4,
641 GIT_CHECKOUT_REMOVE_UNTRACKED
= 1 << 5,
642 GIT_CHECKOUT_REMOVE_IGNORED
= 1 << 6,
643 GIT_CHECKOUT_UPDATE_ONLY
= 1 << 7,
644 GIT_CHECKOUT_DONT_UPDATE_INDEX
= 1 << 8,
645 GIT_CHECKOUT_NO_REFRESH
= 1 << 9,
646 GIT_CHECKOUT_SKIP_UNMERGED
= 1 << 10,
647 GIT_CHECKOUT_USE_OURS
= 1 << 11,
648 GIT_CHECKOUT_USE_THEIRS
= 1 << 12,
649 GIT_CHECKOUT_DISABLE_PATHSPEC_MATCH
= 1 << 13,
650 GIT_CHECKOUT_SKIP_LOCKED_DIRECTORIES
= 1 << 18,
651 GIT_CHECKOUT_DONT_OVERWRITE_IGNORED
= 1 << 19,
652 GIT_CHECKOUT_CONFLICT_STYLE_MERGE
= 1 << 20,
653 GIT_CHECKOUT_CONFLICT_STYLE_DIFF3
= 1 << 21,
655 GIT_CHECKOUT_UPDATE_SUBMODULES
= 1 << 16,
656 GIT_CHECKOUT_UPDATE_SUBMODULES_IF_CHANGED
= 1 << 17,
661 pub enum git_reset_t
{
669 pub enum git_object_t
: c_int
{
671 GIT_OBJECT_INVALID
= -1,
672 GIT_OBJECT_COMMIT
= 1,
676 GIT_OBJECT_OFS_DELTA
= 6,
677 GIT_OBJECT_REF_DELTA
= 7,
682 pub enum git_reference_t
{
683 GIT_REFERENCE_INVALID
= 0,
684 GIT_REFERENCE_DIRECT
= 1,
685 GIT_REFERENCE_SYMBOLIC
= 2,
686 GIT_REFERENCE_ALL
= GIT_REFERENCE_DIRECT
| GIT_REFERENCE_SYMBOLIC
,
691 pub enum git_filemode_t
{
692 GIT_FILEMODE_UNREADABLE
= 0o000000,
693 GIT_FILEMODE_TREE
= 0o040000,
694 GIT_FILEMODE_BLOB
= 0o100644,
695 GIT_FILEMODE_BLOB_EXECUTABLE
= 0o100755,
696 GIT_FILEMODE_LINK
= 0o120000,
697 GIT_FILEMODE_COMMIT
= 0o160000,
702 pub enum git_treewalk_mode
{
703 GIT_TREEWALK_PRE
= 0,
704 GIT_TREEWALK_POST
= 1,
708 pub type git_treewalk_cb
=
709 Option
<extern "C" fn(*const c_char
, *const git_tree_entry
, *mut c_void
) -> c_int
>;
710 pub type git_treebuilder_filter_cb
=
711 Option
<extern "C" fn(*const git_tree_entry
, *mut c_void
) -> c_int
>;
713 pub type git_revwalk_hide_cb
= Option
<extern "C" fn(*const git_oid
, *mut c_void
) -> c_int
>;
716 pub enum git_tree_update_t
{
717 GIT_TREE_UPDATE_UPSERT
= 0,
718 GIT_TREE_UPDATE_REMOVE
= 1,
723 pub struct git_tree_update
{
724 pub action
: git_tree_update_t
,
726 pub filemode
: git_filemode_t
,
727 pub path
: *const c_char
,
731 #[derive(Copy, Clone)]
733 pub ptr
: *mut c_char
,
734 pub reserved
: size_t
,
739 pub enum git_branch_t
{
740 GIT_BRANCH_LOCAL
= 1,
741 GIT_BRANCH_REMOTE
= 2,
742 GIT_BRANCH_ALL
= GIT_BRANCH_LOCAL
| GIT_BRANCH_REMOTE
,
746 pub const GIT_BLAME_NORMAL
: u32 = 0;
747 pub const GIT_BLAME_TRACK_COPIES_SAME_FILE
: u32 = 1 << 0;
748 pub const GIT_BLAME_TRACK_COPIES_SAME_COMMIT_MOVES
: u32 = 1 << 1;
749 pub const GIT_BLAME_TRACK_COPIES_SAME_COMMIT_COPIES
: u32 = 1 << 2;
750 pub const GIT_BLAME_TRACK_COPIES_ANY_COMMIT_COPIES
: u32 = 1 << 3;
751 pub const GIT_BLAME_FIRST_PARENT
: u32 = 1 << 4;
752 pub const GIT_BLAME_USE_MAILMAP
: u32 = 1 << 5;
753 pub const GIT_BLAME_IGNORE_WHITESPACE
: u32 = 1 << 6;
756 #[derive(Copy, Clone)]
757 pub struct git_blame_options
{
761 pub min_match_characters
: u16,
762 pub newest_commit
: git_oid
,
763 pub oldest_commit
: git_oid
,
769 #[derive(Copy, Clone)]
770 pub struct git_blame_hunk
{
771 pub lines_in_hunk
: usize,
772 pub final_commit_id
: git_oid
,
773 pub final_start_line_number
: usize,
774 pub final_signature
: *mut git_signature
,
775 pub orig_commit_id
: git_oid
,
776 pub orig_path
: *const c_char
,
777 pub orig_start_line_number
: usize,
778 pub orig_signature
: *mut git_signature
,
779 pub boundary
: c_char
,
782 pub type git_index_matched_path_cb
=
783 Option
<extern "C" fn(*const c_char
, *const c_char
, *mut c_void
) -> c_int
>;
786 pub enum git_index_entry_extended_flag_t
{
787 GIT_INDEX_ENTRY_INTENT_TO_ADD
= 1 << 13,
788 GIT_INDEX_ENTRY_SKIP_WORKTREE
= 1 << 14,
790 GIT_INDEX_ENTRY_UPTODATE
= 1 << 2,
795 pub enum git_index_entry_flag_t
{
796 GIT_INDEX_ENTRY_EXTENDED
= 0x4000,
797 GIT_INDEX_ENTRY_VALID
= 0x8000,
802 #[derive(Copy, Clone)]
803 pub struct git_index_entry
{
804 pub ctime
: git_index_time
,
805 pub mtime
: git_index_time
,
814 pub flags_extended
: u16,
815 pub path
: *const c_char
,
818 pub const GIT_INDEX_ENTRY_NAMEMASK
: u16 = 0xfff;
819 pub const GIT_INDEX_ENTRY_STAGEMASK
: u16 = 0x3000;
820 pub const GIT_INDEX_ENTRY_STAGESHIFT
: u16 = 12;
823 #[derive(Copy, Clone, Debug, Eq, PartialEq)]
824 pub struct git_index_time
{
826 pub nanoseconds
: u32,
830 pub struct git_config_entry
{
831 pub name
: *const c_char
,
832 pub value
: *const c_char
,
833 pub include_depth
: c_uint
,
834 pub level
: git_config_level_t
,
835 pub free
: Option
<extern "C" fn(*mut git_config_entry
)>,
836 pub payload
: *mut c_void
,
840 pub enum git_config_level_t
: c_int
{
841 GIT_CONFIG_LEVEL_PROGRAMDATA
= 1,
842 GIT_CONFIG_LEVEL_SYSTEM
= 2,
843 GIT_CONFIG_LEVEL_XDG
= 3,
844 GIT_CONFIG_LEVEL_GLOBAL
= 4,
845 GIT_CONFIG_LEVEL_LOCAL
= 5,
846 GIT_CONFIG_LEVEL_APP
= 6,
847 GIT_CONFIG_HIGHEST_LEVEL
= -1,
852 pub enum git_submodule_update_t
{
853 GIT_SUBMODULE_UPDATE_CHECKOUT
= 1,
854 GIT_SUBMODULE_UPDATE_REBASE
= 2,
855 GIT_SUBMODULE_UPDATE_MERGE
= 3,
856 GIT_SUBMODULE_UPDATE_NONE
= 4,
857 GIT_SUBMODULE_UPDATE_DEFAULT
= 0,
862 pub enum git_submodule_ignore_t
: c_int
{
863 GIT_SUBMODULE_IGNORE_UNSPECIFIED
= -1,
865 GIT_SUBMODULE_IGNORE_NONE
= 1,
866 GIT_SUBMODULE_IGNORE_UNTRACKED
= 2,
867 GIT_SUBMODULE_IGNORE_DIRTY
= 3,
868 GIT_SUBMODULE_IGNORE_ALL
= 4,
872 pub type git_submodule_cb
=
873 Option
<extern "C" fn(*mut git_submodule
, *const c_char
, *mut c_void
) -> c_int
>;
876 pub struct git_submodule_update_options
{
878 pub checkout_opts
: git_checkout_options
,
879 pub fetch_opts
: git_fetch_options
,
880 pub allow_fetch
: c_int
,
884 pub struct git_writestream
{
885 pub write
: Option
<extern "C" fn(*mut git_writestream
, *const c_char
, size_t
) -> c_int
>,
886 pub close
: Option
<extern "C" fn(*mut git_writestream
) -> c_int
>,
887 pub free
: Option
<extern "C" fn(*mut git_writestream
)>,
891 pub enum git_attr_value_t
{
892 GIT_ATTR_VALUE_UNSPECIFIED
= 0,
894 GIT_ATTR_VALUE_FALSE
,
895 GIT_ATTR_VALUE_STRING
,
899 pub const GIT_ATTR_CHECK_FILE_THEN_INDEX
: u32 = 0;
900 pub const GIT_ATTR_CHECK_INDEX_THEN_FILE
: u32 = 1;
901 pub const GIT_ATTR_CHECK_INDEX_ONLY
: u32 = 2;
902 pub const GIT_ATTR_CHECK_NO_SYSTEM
: u32 = 1 << 2;
903 pub const GIT_ATTR_CHECK_INCLUDE_HEAD
: u32 = 1 << 3;
906 pub struct git_cred
{
907 pub credtype
: git_credtype_t
,
908 pub free
: Option
<extern "C" fn(*mut git_cred
)>,
912 pub enum git_credtype_t
{
913 GIT_CREDTYPE_USERPASS_PLAINTEXT
= 1 << 0,
914 GIT_CREDTYPE_SSH_KEY
= 1 << 1,
915 GIT_CREDTYPE_SSH_CUSTOM
= 1 << 2,
916 GIT_CREDTYPE_DEFAULT
= 1 << 3,
917 GIT_CREDTYPE_SSH_INTERACTIVE
= 1 << 4,
918 GIT_CREDTYPE_USERNAME
= 1 << 5,
919 GIT_CREDTYPE_SSH_MEMORY
= 1 << 6,
923 pub type git_cred_ssh_interactive_callback
= Option
<
927 instruction
: *const c_char
,
928 instruction_len
: c_int
,
930 prompts
: *const LIBSSH2_USERAUTH_KBDINT_PROMPT
,
931 responses
: *mut LIBSSH2_USERAUTH_KBDINT_RESPONSE
,
932 abstrakt
: *mut *mut c_void
,
936 pub type git_cred_sign_callback
= Option
<
938 session
: *mut LIBSSH2_SESSION
,
939 sig
: *mut *mut c_uchar
,
940 sig_len
: *mut size_t
,
941 data
: *const c_uchar
,
943 abstrakt
: *mut *mut c_void
,
947 pub enum LIBSSH2_SESSION {}
948 pub enum LIBSSH2_USERAUTH_KBDINT_PROMPT {}
949 pub enum LIBSSH2_USERAUTH_KBDINT_RESPONSE {}
952 pub struct git_push_options
{
954 pub pb_parallelism
: c_uint
,
955 pub callbacks
: git_remote_callbacks
,
956 pub proxy_opts
: git_proxy_options
,
957 pub follow_redirects
: git_remote_redirect_t
,
958 pub custom_headers
: git_strarray
,
961 pub type git_tag_foreach_cb
=
962 Option
<extern "C" fn(name
: *const c_char
, oid
: *mut git_oid
, payload
: *mut c_void
) -> c_int
>;
965 pub enum git_index_add_option_t
{
966 GIT_INDEX_ADD_DEFAULT
= 0,
967 GIT_INDEX_ADD_FORCE
= 1 << 0,
968 GIT_INDEX_ADD_DISABLE_PATHSPEC_MATCH
= 1 << 1,
969 GIT_INDEX_ADD_CHECK_PATHSPEC
= 1 << 2,
974 pub enum git_repository_open_flag_t
{
975 GIT_REPOSITORY_OPEN_NO_SEARCH
= 1 << 0,
976 GIT_REPOSITORY_OPEN_CROSS_FS
= 1 << 1,
977 GIT_REPOSITORY_OPEN_BARE
= 1 << 2,
978 GIT_REPOSITORY_OPEN_NO_DOTGIT
= 1 << 3,
979 GIT_REPOSITORY_OPEN_FROM_ENV
= 1 << 4,
984 pub struct git_repository_init_options
{
988 pub workdir_path
: *const c_char
,
989 pub description
: *const c_char
,
990 pub template_path
: *const c_char
,
991 pub initial_head
: *const c_char
,
992 pub origin_url
: *const c_char
,
995 pub const GIT_REPOSITORY_INIT_OPTIONS_VERSION
: c_uint
= 1;
998 pub enum git_repository_init_flag_t
{
999 GIT_REPOSITORY_INIT_BARE
= 1 << 0,
1000 GIT_REPOSITORY_INIT_NO_REINIT
= 1 << 1,
1001 GIT_REPOSITORY_INIT_NO_DOTGIT_DIR
= 1 << 2,
1002 GIT_REPOSITORY_INIT_MKDIR
= 1 << 3,
1003 GIT_REPOSITORY_INIT_MKPATH
= 1 << 4,
1004 GIT_REPOSITORY_INIT_EXTERNAL_TEMPLATE
= 1 << 5,
1009 pub enum git_repository_init_mode_t
{
1010 GIT_REPOSITORY_INIT_SHARED_UMASK
= 0,
1011 GIT_REPOSITORY_INIT_SHARED_GROUP
= 0o002775,
1012 GIT_REPOSITORY_INIT_SHARED_ALL
= 0o002777,
1017 pub enum git_sort_t
{
1019 GIT_SORT_TOPOLOGICAL
= 1 << 0,
1020 GIT_SORT_TIME
= 1 << 1,
1021 GIT_SORT_REVERSE
= 1 << 2,
1026 pub enum git_submodule_status_t
{
1027 GIT_SUBMODULE_STATUS_IN_HEAD
= 1 << 0,
1028 GIT_SUBMODULE_STATUS_IN_INDEX
= 1 << 1,
1029 GIT_SUBMODULE_STATUS_IN_CONFIG
= 1 << 2,
1030 GIT_SUBMODULE_STATUS_IN_WD
= 1 << 3,
1031 GIT_SUBMODULE_STATUS_INDEX_ADDED
= 1 << 4,
1032 GIT_SUBMODULE_STATUS_INDEX_DELETED
= 1 << 5,
1033 GIT_SUBMODULE_STATUS_INDEX_MODIFIED
= 1 << 6,
1034 GIT_SUBMODULE_STATUS_WD_UNINITIALIZED
= 1 << 7,
1035 GIT_SUBMODULE_STATUS_WD_ADDED
= 1 << 8,
1036 GIT_SUBMODULE_STATUS_WD_DELETED
= 1 << 9,
1037 GIT_SUBMODULE_STATUS_WD_MODIFIED
= 1 << 10,
1038 GIT_SUBMODULE_STATUS_WD_INDEX_MODIFIED
= 1 << 11,
1039 GIT_SUBMODULE_STATUS_WD_WD_MODIFIED
= 1 << 12,
1040 GIT_SUBMODULE_STATUS_WD_UNTRACKED
= 1 << 13,
1045 pub struct git_remote_head
{
1049 pub name
: *mut c_char
,
1050 pub symref_target
: *mut c_char
,
1054 pub enum git_pathspec_flag_t
{
1055 GIT_PATHSPEC_DEFAULT
= 0,
1056 GIT_PATHSPEC_IGNORE_CASE
= 1 << 0,
1057 GIT_PATHSPEC_USE_CASE
= 1 << 1,
1058 GIT_PATHSPEC_NO_GLOB
= 1 << 2,
1059 GIT_PATHSPEC_NO_MATCH_ERROR
= 1 << 3,
1060 GIT_PATHSPEC_FIND_FAILURES
= 1 << 4,
1061 GIT_PATHSPEC_FAILURES_ONLY
= 1 << 5,
1065 pub type git_diff_file_cb
= Option
<extern "C" fn(*const git_diff_delta
, f32, *mut c_void
) -> c_int
>;
1066 pub type git_diff_hunk_cb
=
1067 Option
<extern "C" fn(*const git_diff_delta
, *const git_diff_hunk
, *mut c_void
) -> c_int
>;
1068 pub type git_diff_line_cb
= Option
<
1070 *const git_diff_delta
,
1071 *const git_diff_hunk
,
1072 *const git_diff_line
,
1076 pub type git_diff_binary_cb
=
1077 Option
<extern "C" fn(*const git_diff_delta
, *const git_diff_binary
, *mut c_void
) -> c_int
>;
1080 pub struct git_diff_hunk
{
1081 pub old_start
: c_int
,
1082 pub old_lines
: c_int
,
1083 pub new_start
: c_int
,
1084 pub new_lines
: c_int
,
1085 pub header_len
: size_t
,
1086 pub header
: [c_char
; 128],
1090 pub enum git_diff_line_t
{
1091 GIT_DIFF_LINE_CONTEXT
= b' '
as git_diff_line_t
,
1092 GIT_DIFF_LINE_ADDITION
= b'
+'
as git_diff_line_t
,
1093 GIT_DIFF_LINE_DELETION
= b'
-'
as git_diff_line_t
,
1094 GIT_DIFF_LINE_CONTEXT_EOFNL
= b'
='
as git_diff_line_t
,
1095 GIT_DIFF_LINE_ADD_EOFNL
= b'
>'
as git_diff_line_t
,
1096 GIT_DIFF_LINE_DEL_EOFNL
= b'
<'
as git_diff_line_t
,
1097 GIT_DIFF_LINE_FILE_HDR
= b'F'
as git_diff_line_t
,
1098 GIT_DIFF_LINE_HUNK_HDR
= b'H'
as git_diff_line_t
,
1099 GIT_DIFF_LINE_BINARY
= b'B'
as git_diff_line_t
,
1104 pub struct git_diff_line
{
1106 pub old_lineno
: c_int
,
1107 pub new_lineno
: c_int
,
1108 pub num_lines
: c_int
,
1109 pub content_len
: size_t
,
1110 pub content_offset
: git_off_t
,
1111 pub content
: *const c_char
,
1115 pub struct git_diff_options
{
1116 pub version
: c_uint
,
1118 pub ignore_submodules
: git_submodule_ignore_t
,
1119 pub pathspec
: git_strarray
,
1120 pub notify_cb
: git_diff_notify_cb
,
1121 pub progress_cb
: git_diff_progress_cb
,
1122 pub payload
: *mut c_void
,
1123 pub context_lines
: u32,
1124 pub interhunk_lines
: u32,
1126 pub max_size
: git_off_t
,
1127 pub old_prefix
: *const c_char
,
1128 pub new_prefix
: *const c_char
,
1132 pub enum git_diff_format_t
{
1133 GIT_DIFF_FORMAT_PATCH
= 1,
1134 GIT_DIFF_FORMAT_PATCH_HEADER
= 2,
1135 GIT_DIFF_FORMAT_RAW
= 3,
1136 GIT_DIFF_FORMAT_NAME_ONLY
= 4,
1137 GIT_DIFF_FORMAT_NAME_STATUS
= 5,
1138 GIT_DIFF_FORMAT_PATCH_ID
= 6,
1143 pub enum git_diff_stats_format_t
{
1144 GIT_DIFF_STATS_NONE
= 0,
1145 GIT_DIFF_STATS_FULL
= 1 << 0,
1146 GIT_DIFF_STATS_SHORT
= 1 << 1,
1147 GIT_DIFF_STATS_NUMBER
= 1 << 2,
1148 GIT_DIFF_STATS_INCLUDE_SUMMARY
= 1 << 3,
1152 pub type git_diff_notify_cb
= Option
<
1153 extern "C" fn(*const git_diff
, *const git_diff_delta
, *const c_char
, *mut c_void
) -> c_int
,
1156 pub type git_diff_progress_cb
=
1157 Option
<extern "C" fn(*const git_diff
, *const c_char
, *const c_char
, *mut c_void
) -> c_int
>;
1159 pub type git_diff_option_t
= i32;
1160 pub const GIT_DIFF_NORMAL
: git_diff_option_t
= 0;
1161 pub const GIT_DIFF_REVERSE
: git_diff_option_t
= 1 << 0;
1162 pub const GIT_DIFF_INCLUDE_IGNORED
: git_diff_option_t
= 1 << 1;
1163 pub const GIT_DIFF_RECURSE_IGNORED_DIRS
: git_diff_option_t
= 1 << 2;
1164 pub const GIT_DIFF_INCLUDE_UNTRACKED
: git_diff_option_t
= 1 << 3;
1165 pub const GIT_DIFF_RECURSE_UNTRACKED_DIRS
: git_diff_option_t
= 1 << 4;
1166 pub const GIT_DIFF_INCLUDE_UNMODIFIED
: git_diff_option_t
= 1 << 5;
1167 pub const GIT_DIFF_INCLUDE_TYPECHANGE
: git_diff_option_t
= 1 << 6;
1168 pub const GIT_DIFF_INCLUDE_TYPECHANGE_TREES
: git_diff_option_t
= 1 << 7;
1169 pub const GIT_DIFF_IGNORE_FILEMODE
: git_diff_option_t
= 1 << 8;
1170 pub const GIT_DIFF_IGNORE_SUBMODULES
: git_diff_option_t
= 1 << 9;
1171 pub const GIT_DIFF_IGNORE_CASE
: git_diff_option_t
= 1 << 10;
1172 pub const GIT_DIFF_DISABLE_PATHSPEC_MATCH
: git_diff_option_t
= 1 << 12;
1173 pub const GIT_DIFF_SKIP_BINARY_CHECK
: git_diff_option_t
= 1 << 13;
1174 pub const GIT_DIFF_ENABLE_FAST_UNTRACKED_DIRS
: git_diff_option_t
= 1 << 14;
1175 pub const GIT_DIFF_UPDATE_INDEX
: git_diff_option_t
= 1 << 15;
1176 pub const GIT_DIFF_INCLUDE_UNREADABLE
: git_diff_option_t
= 1 << 16;
1177 pub const GIT_DIFF_INCLUDE_UNREADABLE_AS_UNTRACKED
: git_diff_option_t
= 1 << 17;
1178 pub const GIT_DIFF_INDENT_HEURISTIC
: git_diff_option_t
= 1 << 18;
1179 pub const GIT_DIFF_IGNORE_BLANK_LINES
: git_diff_option_t
= 1 << 19;
1180 pub const GIT_DIFF_FORCE_TEXT
: git_diff_option_t
= 1 << 20;
1181 pub const GIT_DIFF_FORCE_BINARY
: git_diff_option_t
= 1 << 21;
1182 pub const GIT_DIFF_IGNORE_WHITESPACE
: git_diff_option_t
= 1 << 22;
1183 pub const GIT_DIFF_IGNORE_WHITESPACE_CHANGE
: git_diff_option_t
= 1 << 23;
1184 pub const GIT_DIFF_IGNORE_WHITESPACE_EOL
: git_diff_option_t
= 1 << 24;
1185 pub const GIT_DIFF_SHOW_UNTRACKED_CONTENT
: git_diff_option_t
= 1 << 25;
1186 pub const GIT_DIFF_SHOW_UNMODIFIED
: git_diff_option_t
= 1 << 26;
1187 pub const GIT_DIFF_PATIENCE
: git_diff_option_t
= 1 << 28;
1188 pub const GIT_DIFF_MINIMAL
: git_diff_option_t
= 1 << 29;
1189 pub const GIT_DIFF_SHOW_BINARY
: git_diff_option_t
= 1 << 30;
1192 pub struct git_diff_find_options
{
1193 pub version
: c_uint
,
1195 pub rename_threshold
: u16,
1196 pub rename_from_rewrite_threshold
: u16,
1197 pub copy_threshold
: u16,
1198 pub break_rewrite_threshold
: u16,
1199 pub rename_limit
: size_t
,
1200 pub metric
: *mut git_diff_similarity_metric
,
1204 pub struct git_diff_similarity_metric
{
1205 pub file_signature
: Option
<
1206 extern "C" fn(*mut *mut c_void
, *const git_diff_file
, *const c_char
, *mut c_void
) -> c_int
,
1208 pub buffer_signature
: Option
<
1211 *const git_diff_file
,
1217 pub free_signature
: Option
<extern "C" fn(*mut c_void
, *mut c_void
)>,
1219 Option
<extern "C" fn(*mut c_int
, *mut c_void
, *mut c_void
, *mut c_void
) -> c_int
>,
1220 pub payload
: *mut c_void
,
1223 pub const GIT_DIFF_FIND_OPTIONS_VERSION
: c_uint
= 1;
1225 pub const GIT_DIFF_FIND_BY_CONFIG
: u32 = 0;
1226 pub const GIT_DIFF_FIND_RENAMES
: u32 = 1 << 0;
1227 pub const GIT_DIFF_FIND_RENAMES_FROM_REWRITES
: u32 = 1 << 1;
1228 pub const GIT_DIFF_FIND_COPIES
: u32 = 1 << 2;
1229 pub const GIT_DIFF_FIND_COPIES_FROM_UNMODIFIED
: u32 = 1 << 3;
1230 pub const GIT_DIFF_FIND_REWRITES
: u32 = 1 << 4;
1231 pub const GIT_DIFF_BREAK_REWRITES
: u32 = 1 << 5;
1232 pub const GIT_DIFF_FIND_AND_BREAK_REWRITES
: u32 = GIT_DIFF_FIND_REWRITES
| GIT_DIFF_BREAK_REWRITES
;
1233 pub const GIT_DIFF_FIND_FOR_UNTRACKED
: u32 = 1 << 6;
1234 pub const GIT_DIFF_FIND_ALL
: u32 = 0x0ff;
1235 pub const GIT_DIFF_FIND_IGNORE_LEADING_WHITESPACE
: u32 = 0;
1236 pub const GIT_DIFF_FIND_IGNORE_WHITESPACE
: u32 = 1 << 12;
1237 pub const GIT_DIFF_FIND_DONT_IGNORE_WHITESPACE
: u32 = 1 << 13;
1238 pub const GIT_DIFF_FIND_EXACT_MATCH_ONLY
: u32 = 1 << 14;
1239 pub const GIT_DIFF_BREAK_REWRITES_FOR_RENAMES_ONLY
: u32 = 1 << 15;
1240 pub const GIT_DIFF_FIND_REMOVE_UNMODIFIED
: u32 = 1 << 16;
1243 pub struct git_diff_format_email_options
{
1244 pub version
: c_uint
,
1246 pub patch_no
: usize,
1247 pub total_patches
: usize,
1248 pub id
: *const git_oid
,
1249 pub summary
: *const c_char
,
1250 pub body
: *const c_char
,
1251 pub author
: *const git_signature
,
1254 pub const GIT_DIFF_FORMAT_EMAIL_OPTIONS_VERSION
: c_uint
= 1;
1256 pub const GIT_DIFF_FORMAT_EMAIL_NONE
: u32 = 0;
1257 pub const GIT_DIFF_FORMAT_EMAIL_EXCLUDE_SUBJECT_PATCH_MARKER
: u32 = 1 << 0;
1260 pub struct git_diff_patchid_options
{
1261 pub version
: c_uint
,
1264 pub const GIT_DIFF_PATCHID_OPTIONS_VERSION
: c_uint
= 1;
1267 pub struct git_diff_binary
{
1268 pub contains_data
: c_uint
,
1269 pub old_file
: git_diff_binary_file
,
1270 pub new_file
: git_diff_binary_file
,
1274 pub struct git_diff_binary_file
{
1275 pub kind
: git_diff_binary_t
,
1276 pub data
: *const c_char
,
1277 pub datalen
: size_t
,
1278 pub inflatedlen
: size_t
,
1282 pub enum git_diff_binary_t
{
1283 GIT_DIFF_BINARY_NONE
,
1284 GIT_DIFF_BINARY_LITERAL
,
1285 GIT_DIFF_BINARY_DELTA
,
1290 pub struct git_merge_options
{
1291 pub version
: c_uint
,
1293 pub rename_threshold
: c_uint
,
1294 pub target_limit
: c_uint
,
1295 pub metric
: *mut git_diff_similarity_metric
,
1296 pub recursion_limit
: c_uint
,
1297 pub default_driver
: *const c_char
,
1298 pub file_favor
: git_merge_file_favor_t
,
1299 pub file_flags
: u32,
1303 pub enum git_merge_flag_t
{
1304 GIT_MERGE_FIND_RENAMES
= 1 << 0,
1305 GIT_MERGE_FAIL_ON_CONFLICT
= 1 << 1,
1306 GIT_MERGE_SKIP_REUC
= 1 << 2,
1307 GIT_MERGE_NO_RECURSIVE
= 1 << 3,
1312 pub enum git_merge_file_favor_t
{
1313 GIT_MERGE_FILE_FAVOR_NORMAL
= 0,
1314 GIT_MERGE_FILE_FAVOR_OURS
= 1,
1315 GIT_MERGE_FILE_FAVOR_THEIRS
= 2,
1316 GIT_MERGE_FILE_FAVOR_UNION
= 3,
1321 pub enum git_merge_file_flag_t
{
1322 GIT_MERGE_FILE_DEFAULT
= 0,
1323 GIT_MERGE_FILE_STYLE_MERGE
= 1 << 0,
1324 GIT_MERGE_FILE_STYLE_DIFF3
= 1 << 1,
1325 GIT_MERGE_FILE_SIMPLIFY_ALNUM
= 1 << 2,
1326 GIT_MERGE_FILE_IGNORE_WHITESPACE
= 1 << 3,
1327 GIT_MERGE_FILE_IGNORE_WHITESPACE_CHANGE
= 1 << 4,
1328 GIT_MERGE_FILE_IGNORE_WHITESPACE_EOL
= 1 << 5,
1329 GIT_MERGE_FILE_DIFF_PATIENCE
= 1 << 6,
1330 GIT_MERGE_FILE_DIFF_MINIMAL
= 1 << 7,
1335 pub enum git_merge_analysis_t
{
1336 GIT_MERGE_ANALYSIS_NONE
= 0,
1337 GIT_MERGE_ANALYSIS_NORMAL
= 1 << 0,
1338 GIT_MERGE_ANALYSIS_UP_TO_DATE
= 1 << 1,
1339 GIT_MERGE_ANALYSIS_FASTFORWARD
= 1 << 2,
1340 GIT_MERGE_ANALYSIS_UNBORN
= 1 << 3,
1345 pub enum git_merge_preference_t
{
1346 GIT_MERGE_PREFERENCE_NONE
= 0,
1347 GIT_MERGE_PREFERENCE_NO_FASTFORWARD
= 1 << 0,
1348 GIT_MERGE_PREFERENCE_FASTFORWARD_ONLY
= 1 << 1,
1352 pub type git_transport_cb
= Option
<
1354 out
: *mut *mut git_transport
,
1355 owner
: *mut git_remote
,
1361 pub struct git_transport
{
1362 pub version
: c_uint
,
1363 pub connect
: Option
<
1365 transport
: *mut git_transport
,
1368 connect_opts
: *const git_remote_connect_options
,
1371 pub set_connect_opts
: Option
<
1373 transport
: *mut git_transport
,
1374 connect_opts
: *const git_remote_connect_options
,
1378 Option
<extern "C" fn(capabilities
: *mut c_uint
, transport
: *mut git_transport
) -> c_int
>,
1381 out
: *mut *mut *const git_remote_head
,
1383 transport
: *mut git_transport
,
1386 pub push
: Option
<extern "C" fn(transport
: *mut git_transport
, push
: *mut git_push
) -> c_int
>,
1387 pub negotiate_fetch
: Option
<
1389 transport
: *mut git_transport
,
1390 repo
: *mut git_repository
,
1391 refs
: *const *const git_remote_head
,
1395 pub download_pack
: Option
<
1397 transport
: *mut git_transport
,
1398 repo
: *mut git_repository
,
1399 stats
: *mut git_indexer_progress
,
1402 pub is_connected
: Option
<extern "C" fn(transport
: *mut git_transport
) -> c_int
>,
1403 pub cancel
: Option
<extern "C" fn(transport
: *mut git_transport
)>,
1404 pub close
: Option
<extern "C" fn(transport
: *mut git_transport
) -> c_int
>,
1405 pub free
: Option
<extern "C" fn(transport
: *mut git_transport
)>,
1409 pub struct git_remote_connect_options
{
1410 pub version
: c_uint
,
1411 pub callbacks
: git_remote_callbacks
,
1412 pub proxy_opts
: git_proxy_options
,
1413 pub follow_redirects
: git_remote_redirect_t
,
1414 pub custom_headers
: git_strarray
,
1418 pub enum git_remote_redirect_t
{
1419 GIT_REMOTE_REDIRECT_NONE
= 1 << 0,
1420 GIT_REMOTE_REDIRECT_INITIAL
= 1 << 1,
1421 GIT_REMOTE_REDIRECT_ALL
= 1 << 2,
1426 pub struct git_odb_backend
{
1427 pub version
: c_uint
,
1428 pub odb
: *mut git_odb
,
1434 *mut git_odb_backend
,
1439 pub read_prefix
: Option
<
1445 *mut git_odb_backend
,
1450 pub read_header
: Option
<
1454 *mut git_odb_backend
,
1461 *mut git_odb_backend
,
1469 pub writestream
: Option
<
1471 *mut *mut git_odb_stream
,
1472 *mut git_odb_backend
,
1478 pub readstream
: Option
<
1480 *mut *mut git_odb_stream
,
1483 *mut git_odb_backend
,
1488 pub exists
: Option
<extern "C" fn(*mut git_odb_backend
, *const git_oid
) -> c_int
>,
1491 Option
<extern "C" fn(*mut git_oid
, *mut git_odb_backend
, *const git_oid
, size_t
) -> c_int
>,
1493 pub refresh
: Option
<extern "C" fn(*mut git_odb_backend
) -> c_int
>,
1496 Option
<extern "C" fn(*mut git_odb_backend
, git_odb_foreach_cb
, *mut c_void
) -> c_int
>,
1498 pub writepack
: Option
<
1500 *mut *mut git_odb_writepack
,
1501 *mut git_odb_backend
,
1503 git_indexer_progress_cb
,
1508 pub writemidx
: Option
<extern "C" fn(*mut git_odb_backend
) -> c_int
>,
1510 pub freshen
: Option
<extern "C" fn(*mut git_odb_backend
, *const git_oid
) -> c_int
>,
1512 pub free
: Option
<extern "C" fn(*mut git_odb_backend
)>,
1516 pub enum git_odb_lookup_flags_t
{
1517 GIT_ODB_LOOKUP_NO_REFRESH
= 1 << 0,
1522 pub struct git_odb_writepack
{
1523 pub backend
: *mut git_odb_backend
,
1527 *mut git_odb_writepack
,
1530 *mut git_indexer_progress
,
1535 Option
<unsafe extern "C" fn(*mut git_odb_writepack
, *mut git_indexer_progress
) -> c_int
>,
1537 pub free
: Option
<unsafe extern "C" fn(*mut git_odb_writepack
)>,
1541 pub struct git_refdb_backend
{
1542 pub version
: c_uint
,
1543 pub exists
: Option
<extern "C" fn(*mut c_int
, *mut git_refdb_backend
, *const c_char
) -> c_int
>,
1545 extern "C" fn(*mut *mut git_reference
, *mut git_refdb_backend
, *const c_char
) -> c_int
,
1547 pub iterator
: Option
<
1549 *mut *mut git_reference_iterator
,
1550 *mut git_refdb_backend
,
1556 *mut git_refdb_backend
,
1557 *const git_reference
,
1559 *const git_signature
,
1567 *mut *mut git_reference
,
1568 *mut git_refdb_backend
,
1572 *const git_signature
,
1578 *mut git_refdb_backend
,
1584 pub compress
: Option
<extern "C" fn(*mut git_refdb_backend
) -> c_int
>,
1585 pub has_log
: Option
<extern "C" fn(*mut git_refdb_backend
, *const c_char
) -> c_int
>,
1586 pub ensure_log
: Option
<extern "C" fn(*mut git_refdb_backend
, *const c_char
) -> c_int
>,
1587 pub free
: Option
<extern "C" fn(*mut git_refdb_backend
)>,
1589 Option
<extern "C" fn(*mut *mut git_reflog
, *mut git_refdb_backend
, *const c_char
) -> c_int
>,
1590 pub reflog_write
: Option
<extern "C" fn(*mut git_refdb_backend
, *mut git_reflog
) -> c_int
>,
1592 Option
<extern "C" fn(*mut git_refdb_backend
, *const c_char
, *const c_char
) -> c_int
>,
1593 pub reflog_delete
: Option
<extern "C" fn(*mut git_refdb_backend
, *const c_char
) -> c_int
>,
1595 Option
<extern "C" fn(*mut *mut c_void
, *mut git_refdb_backend
, *const c_char
) -> c_int
>,
1598 *mut git_refdb_backend
,
1602 *const git_reference
,
1603 *const git_signature
,
1610 pub struct git_proxy_options
{
1611 pub version
: c_uint
,
1612 pub kind
: git_proxy_t
,
1613 pub url
: *const c_char
,
1614 pub credentials
: git_cred_acquire_cb
,
1615 pub certificate_check
: git_transport_certificate_check_cb
,
1616 pub payload
: *mut c_void
,
1620 pub enum git_proxy_t
{
1623 GIT_PROXY_SPECIFIED
= 2,
1628 pub enum git_smart_service_t
{
1629 GIT_SERVICE_UPLOADPACK_LS
= 1,
1630 GIT_SERVICE_UPLOADPACK
= 2,
1631 GIT_SERVICE_RECEIVEPACK_LS
= 3,
1632 GIT_SERVICE_RECEIVEPACK
= 4,
1637 pub struct git_smart_subtransport_stream
{
1638 pub subtransport
: *mut git_smart_subtransport
,
1641 *mut git_smart_subtransport_stream
,
1648 Option
<extern "C" fn(*mut git_smart_subtransport_stream
, *const c_char
, size_t
) -> c_int
>,
1649 pub free
: Option
<extern "C" fn(*mut git_smart_subtransport_stream
)>,
1653 pub struct git_smart_subtransport
{
1656 *mut *mut git_smart_subtransport_stream
,
1657 *mut git_smart_subtransport
,
1659 git_smart_service_t
,
1662 pub close
: Option
<extern "C" fn(*mut git_smart_subtransport
) -> c_int
>,
1663 pub free
: Option
<extern "C" fn(*mut git_smart_subtransport
)>,
1666 pub type git_smart_subtransport_cb
= Option
<
1667 extern "C" fn(*mut *mut git_smart_subtransport
, *mut git_transport
, *mut c_void
) -> c_int
,
1671 pub struct git_smart_subtransport_definition
{
1672 pub callback
: git_smart_subtransport_cb
,
1674 pub param
: *mut c_void
,
1678 pub struct git_describe_options
{
1679 pub version
: c_uint
,
1680 pub max_candidates_tags
: c_uint
,
1681 pub describe_strategy
: c_uint
,
1682 pub pattern
: *const c_char
,
1683 pub only_follow_first_parent
: c_int
,
1684 pub show_commit_oid_as_fallback
: c_int
,
1688 pub enum git_describe_strategy_t
{
1689 GIT_DESCRIBE_DEFAULT
,
1696 pub struct git_describe_format_options
{
1697 pub version
: c_uint
,
1698 pub abbreviated_size
: c_uint
,
1699 pub always_use_long_format
: c_int
,
1700 pub dirty_suffix
: *const c_char
,
1704 pub enum git_packbuilder_stage_t
{
1705 GIT_PACKBUILDER_ADDING_OBJECTS
,
1706 GIT_PACKBUILDER_DELTAFICATION
,
1711 pub enum git_stash_flags
{
1712 GIT_STASH_DEFAULT
= 0,
1713 GIT_STASH_KEEP_INDEX
= 1 << 0,
1714 GIT_STASH_INCLUDE_UNTRACKED
= 1 << 1,
1715 GIT_STASH_INCLUDE_IGNORED
= 1 << 2,
1720 pub enum git_stash_apply_flags
{
1721 GIT_STASH_APPLY_DEFAULT
= 0,
1722 GIT_STASH_APPLY_REINSTATE_INDEX
= 1 << 0,
1727 pub enum git_stash_apply_progress_t
{
1728 GIT_STASH_APPLY_PROGRESS_NONE
= 0,
1729 GIT_STASH_APPLY_PROGRESS_LOADING_STASH
,
1730 GIT_STASH_APPLY_PROGRESS_ANALYZE_INDEX
,
1731 GIT_STASH_APPLY_PROGRESS_ANALYZE_MODIFIED
,
1732 GIT_STASH_APPLY_PROGRESS_ANALYZE_UNTRACKED
,
1733 GIT_STASH_APPLY_PROGRESS_CHECKOUT_UNTRACKED
,
1734 GIT_STASH_APPLY_PROGRESS_CHECKOUT_MODIFIED
,
1735 GIT_STASH_APPLY_PROGRESS_DONE
,
1740 pub struct git_stash_apply_options
{
1741 pub version
: c_uint
,
1743 pub checkout_options
: git_checkout_options
,
1744 pub progress_cb
: git_stash_apply_progress_cb
,
1745 pub progress_payload
: *mut c_void
,
1748 pub type git_stash_apply_progress_cb
=
1749 Option
<extern "C" fn(progress
: git_stash_apply_progress_t
, payload
: *mut c_void
) -> c_int
>;
1751 pub type git_stash_cb
= Option
<
1754 message
: *const c_char
,
1755 stash_id
: *const git_oid
,
1756 payload
: *mut c_void
,
1760 pub type git_packbuilder_foreach_cb
=
1761 Option
<extern "C" fn(*const c_void
, size_t
, *mut c_void
) -> c_int
>;
1763 pub type git_odb_foreach_cb
=
1764 Option
<extern "C" fn(id
: *const git_oid
, payload
: *mut c_void
) -> c_int
>;
1766 pub type git_commit_signing_cb
= Option
<
1768 signature
: *mut git_buf
,
1769 signature_field
: *mut git_buf
,
1770 commit_content
: *const c_char
,
1771 payload
: *mut c_void
,
1775 pub type git_commit_create_cb
= Option
<
1778 *const git_signature
,
1779 *const git_signature
,
1789 pub const GIT_REBASE_NO_OPERATION
: usize = usize::max_value();
1792 pub struct git_rebase_options
{
1793 pub version
: c_uint
,
1795 pub inmemory
: c_int
,
1796 pub rewrite_notes_ref
: *const c_char
,
1797 pub merge_options
: git_merge_options
,
1798 pub checkout_options
: git_checkout_options
,
1799 pub commit_create_cb
: git_commit_create_cb
,
1800 pub signing_cb
: git_commit_signing_cb
,
1801 pub payload
: *mut c_void
,
1805 pub enum git_rebase_operation_t
{
1806 GIT_REBASE_OPERATION_PICK
= 0,
1807 GIT_REBASE_OPERATION_REWORD
,
1808 GIT_REBASE_OPERATION_EDIT
,
1809 GIT_REBASE_OPERATION_SQUASH
,
1810 GIT_REBASE_OPERATION_FIXUP
,
1811 GIT_REBASE_OPERATION_EXEC
,
1816 pub struct git_rebase_operation
{
1817 pub kind
: git_rebase_operation_t
,
1819 pub exec
: *const c_char
,
1823 pub struct git_cherrypick_options
{
1824 pub version
: c_uint
,
1825 pub mainline
: c_uint
,
1826 pub merge_opts
: git_merge_options
,
1827 pub checkout_opts
: git_checkout_options
,
1830 pub type git_revert_options
= git_cherrypick_options
;
1832 pub type git_apply_delta_cb
=
1833 Option
<extern "C" fn(delta
: *const git_diff_delta
, payload
: *mut c_void
) -> c_int
>;
1835 pub type git_apply_hunk_cb
=
1836 Option
<extern "C" fn(hunk
: *const git_diff_hunk
, payload
: *mut c_void
) -> c_int
>;
1839 pub enum git_apply_flags_t
{
1840 GIT_APPLY_CHECK
= 1<<0,
1845 pub struct git_apply_options
{
1846 pub version
: c_uint
,
1847 pub delta_cb
: git_apply_delta_cb
,
1848 pub hunk_cb
: git_apply_hunk_cb
,
1849 pub payload
: *mut c_void
,
1854 pub enum git_apply_location_t
{
1855 GIT_APPLY_LOCATION_WORKDIR
= 0,
1856 GIT_APPLY_LOCATION_INDEX
= 1,
1857 GIT_APPLY_LOCATION_BOTH
= 2,
1862 pub enum git_libgit2_opt_t
{
1863 GIT_OPT_GET_MWINDOW_SIZE
= 0,
1864 GIT_OPT_SET_MWINDOW_SIZE
,
1865 GIT_OPT_GET_MWINDOW_MAPPED_LIMIT
,
1866 GIT_OPT_SET_MWINDOW_MAPPED_LIMIT
,
1867 GIT_OPT_GET_SEARCH_PATH
,
1868 GIT_OPT_SET_SEARCH_PATH
,
1869 GIT_OPT_SET_CACHE_OBJECT_LIMIT
,
1870 GIT_OPT_SET_CACHE_MAX_SIZE
,
1871 GIT_OPT_ENABLE_CACHING
,
1872 GIT_OPT_GET_CACHED_MEMORY
,
1873 GIT_OPT_GET_TEMPLATE_PATH
,
1874 GIT_OPT_SET_TEMPLATE_PATH
,
1875 GIT_OPT_SET_SSL_CERT_LOCATIONS
,
1876 GIT_OPT_SET_USER_AGENT
,
1877 GIT_OPT_ENABLE_STRICT_OBJECT_CREATION
,
1878 GIT_OPT_ENABLE_STRICT_SYMBOLIC_REF_CREATION
,
1879 GIT_OPT_SET_SSL_CIPHERS
,
1880 GIT_OPT_GET_USER_AGENT
,
1881 GIT_OPT_ENABLE_OFS_DELTA
,
1882 GIT_OPT_ENABLE_FSYNC_GITDIR
,
1883 GIT_OPT_GET_WINDOWS_SHAREMODE
,
1884 GIT_OPT_SET_WINDOWS_SHAREMODE
,
1885 GIT_OPT_ENABLE_STRICT_HASH_VERIFICATION
,
1886 GIT_OPT_SET_ALLOCATOR
,
1887 GIT_OPT_ENABLE_UNSAVED_INDEX_SAFETY
,
1888 GIT_OPT_GET_PACK_MAX_OBJECTS
,
1889 GIT_OPT_SET_PACK_MAX_OBJECTS
,
1890 GIT_OPT_DISABLE_PACK_KEEP_FILE_CHECKS
,
1891 GIT_OPT_ENABLE_HTTP_EXPECT_CONTINUE
,
1892 GIT_OPT_GET_MWINDOW_FILE_LIMIT
,
1893 GIT_OPT_SET_MWINDOW_FILE_LIMIT
,
1894 GIT_OPT_SET_ODB_PACKED_PRIORITY
,
1895 GIT_OPT_SET_ODB_LOOSE_PRIORITY
,
1896 GIT_OPT_GET_EXTENSIONS
,
1897 GIT_OPT_SET_EXTENSIONS
,
1898 GIT_OPT_GET_OWNER_VALIDATION
,
1899 GIT_OPT_SET_OWNER_VALIDATION
,
1904 pub enum git_reference_format_t
{
1905 GIT_REFERENCE_FORMAT_NORMAL
= 0,
1906 GIT_REFERENCE_FORMAT_ALLOW_ONELEVEL
= 1 << 0,
1907 GIT_REFERENCE_FORMAT_REFSPEC_PATTERN
= 1 << 1,
1908 GIT_REFERENCE_FORMAT_REFSPEC_SHORTHAND
= 1 << 2,
1913 pub struct git_worktree_add_options
{
1914 pub version
: c_uint
,
1916 pub reference
: *mut git_reference
,
1917 pub checkout_options
: git_checkout_options
,
1920 pub const GIT_WORKTREE_ADD_OPTIONS_VERSION
: c_uint
= 1;
1923 pub enum git_worktree_prune_t
{
1924 /* Prune working tree even if working tree is valid */
1925 GIT_WORKTREE_PRUNE_VALID
= 1 << 0,
1926 /* Prune working tree even if it is locked */
1927 GIT_WORKTREE_PRUNE_LOCKED
= 1 << 1,
1928 /* Prune checked out working tree */
1929 GIT_WORKTREE_PRUNE_WORKING_TREE
= 1 << 2,
1934 pub struct git_worktree_prune_options
{
1935 pub version
: c_uint
,
1939 pub const GIT_WORKTREE_PRUNE_OPTIONS_VERSION
: c_uint
= 1;
1941 pub type git_repository_mergehead_foreach_cb
=
1942 Option
<extern "C" fn(oid
: *const git_oid
, payload
: *mut c_void
) -> c_int
>;
1944 pub type git_repository_fetchhead_foreach_cb
= Option
<
1945 extern "C" fn(*const c_char
, *const c_char
, *const git_oid
, c_uint
, *mut c_void
) -> c_int
,
1949 pub enum git_trace_level_t
{
1950 /* No tracing will be performed. */
1953 /* Severe errors that may impact the program's execution */
1954 GIT_TRACE_FATAL
= 1,
1956 /* Errors that do not impact the program's execution */
1957 GIT_TRACE_ERROR
= 2,
1959 /* Warnings that suggest abnormal data */
1962 /* Informational messages about program execution */
1965 /* Detailed data that allows for debugging */
1966 GIT_TRACE_DEBUG
= 5,
1968 /* Exceptionally detailed debugging data */
1969 GIT_TRACE_TRACE
= 6,
1973 pub type git_trace_cb
= Option
<extern "C" fn(level
: git_trace_level_t
, msg
: *const c_char
)>;
1976 pub enum git_feature_t
{
1977 GIT_FEATURE_THREADS
= 1 << 0,
1978 GIT_FEATURE_HTTPS
= 1 << 1,
1979 GIT_FEATURE_SSH
= 1 << 2,
1980 GIT_FEATURE_NSEC
= 1 << 3,
1985 pub struct git_message_trailer
{
1986 pub key
: *const c_char
,
1987 pub value
: *const c_char
,
1991 #[derive(Copy, Clone)]
1992 pub struct git_message_trailer_array
{
1993 pub trailers
: *mut git_message_trailer
,
1995 pub _trailer_block
: *mut c_char
,
1999 pub struct git_email_create_options
{
2000 pub version
: c_uint
,
2002 pub diff_opts
: git_diff_options
,
2003 pub diff_find_opts
: git_diff_find_options
,
2004 pub subject_prefix
: *const c_char
,
2005 pub start_number
: usize,
2006 pub reroll_number
: usize,
2009 pub const GIT_EMAIL_CREATE_OPTIONS_VERSION
: c_uint
= 1;
2012 pub enum git_email_create_flags_t
{
2013 GIT_EMAIL_CREATE_DEFAULT
= 0,
2014 GIT_EMAIL_CREATE_OMIT_NUMBERS
= 1 << 0,
2015 GIT_EMAIL_CREATE_ALWAYS_NUMBER
= 1 << 1,
2016 GIT_EMAIL_CREATE_NO_RENAMES
= 1 << 2,
2022 pub fn git_libgit2_init() -> c_int
;
2023 pub fn git_libgit2_shutdown() -> c_int
;
2026 pub fn git_repository_new(out
: *mut *mut git_repository
) -> c_int
;
2027 pub fn git_repository_free(repo
: *mut git_repository
);
2028 pub fn git_repository_open(repo
: *mut *mut git_repository
, path
: *const c_char
) -> c_int
;
2029 pub fn git_repository_open_bare(repo
: *mut *mut git_repository
, path
: *const c_char
) -> c_int
;
2030 pub fn git_repository_open_ext(
2031 repo
: *mut *mut git_repository
,
2032 path
: *const c_char
,
2034 ceiling_dirs
: *const c_char
,
2036 pub fn git_repository_open_from_worktree(
2037 repo
: *mut *mut git_repository
,
2038 worktree
: *mut git_worktree
,
2040 pub fn git_repository_wrap_odb(repo
: *mut *mut git_repository
, odb
: *mut git_odb
) -> c_int
;
2041 pub fn git_repository_init(
2042 repo
: *mut *mut git_repository
,
2043 path
: *const c_char
,
2046 pub fn git_repository_init_ext(
2047 out
: *mut *mut git_repository
,
2048 repo_path
: *const c_char
,
2049 opts
: *mut git_repository_init_options
,
2051 pub fn git_repository_init_init_options(
2052 opts
: *mut git_repository_init_options
,
2055 pub fn git_repository_get_namespace(repo
: *mut git_repository
) -> *const c_char
;
2056 pub fn git_repository_set_namespace(
2057 repo
: *mut git_repository
,
2058 namespace
: *const c_char
,
2060 pub fn git_repository_head(out
: *mut *mut git_reference
, repo
: *mut git_repository
) -> c_int
;
2061 pub fn git_repository_set_head(repo
: *mut git_repository
, refname
: *const c_char
) -> c_int
;
2063 pub fn git_repository_head_detached(repo
: *mut git_repository
) -> c_int
;
2064 pub fn git_repository_set_head_detached(
2065 repo
: *mut git_repository
,
2066 commitish
: *const git_oid
,
2068 pub fn git_repository_set_head_detached_from_annotated(
2069 repo
: *mut git_repository
,
2070 commitish
: *const git_annotated_commit
,
2072 pub fn git_repository_set_bare(repo
: *mut git_repository
) -> c_int
;
2073 pub fn git_repository_is_worktree(repo
: *const git_repository
) -> c_int
;
2074 pub fn git_repository_is_bare(repo
: *const git_repository
) -> c_int
;
2075 pub fn git_repository_is_empty(repo
: *mut git_repository
) -> c_int
;
2076 pub fn git_repository_is_shallow(repo
: *mut git_repository
) -> c_int
;
2077 pub fn git_repository_path(repo
: *const git_repository
) -> *const c_char
;
2078 pub fn git_repository_state(repo
: *mut git_repository
) -> c_int
;
2079 pub fn git_repository_workdir(repo
: *const git_repository
) -> *const c_char
;
2080 pub fn git_repository_set_workdir(
2081 repo
: *mut git_repository
,
2082 workdir
: *const c_char
,
2083 update_gitlink
: c_int
,
2085 pub fn git_repository_index(out
: *mut *mut git_index
, repo
: *mut git_repository
) -> c_int
;
2086 pub fn git_repository_set_index(repo
: *mut git_repository
, index
: *mut git_index
) -> c_int
;
2088 pub fn git_repository_message(buf
: *mut git_buf
, repo
: *mut git_repository
) -> c_int
;
2090 pub fn git_repository_message_remove(repo
: *mut git_repository
) -> c_int
;
2091 pub fn git_repository_config(out
: *mut *mut git_config
, repo
: *mut git_repository
) -> c_int
;
2092 pub fn git_repository_set_config(repo
: *mut git_repository
, config
: *mut git_config
) -> c_int
;
2093 pub fn git_repository_config_snapshot(
2094 out
: *mut *mut git_config
,
2095 repo
: *mut git_repository
,
2097 pub fn git_repository_discover(
2099 start_path
: *const c_char
,
2101 ceiling_dirs
: *const c_char
,
2103 pub fn git_repository_set_odb(repo
: *mut git_repository
, odb
: *mut git_odb
) -> c_int
;
2105 pub fn git_repository_refdb(out
: *mut *mut git_refdb
, repo
: *mut git_repository
) -> c_int
;
2106 pub fn git_repository_set_refdb(repo
: *mut git_repository
, refdb
: *mut git_refdb
) -> c_int
;
2108 pub fn git_repository_reinit_filesystem(
2109 repo
: *mut git_repository
,
2110 recurse_submodules
: c_int
,
2112 pub fn git_repository_mergehead_foreach(
2113 repo
: *mut git_repository
,
2114 callback
: git_repository_mergehead_foreach_cb
,
2115 payload
: *mut c_void
,
2117 pub fn git_repository_fetchhead_foreach(
2118 repo
: *mut git_repository
,
2119 callback
: git_repository_fetchhead_foreach_cb
,
2120 payload
: *mut c_void
,
2122 pub fn git_ignore_add_rule(repo
: *mut git_repository
, rules
: *const c_char
) -> c_int
;
2123 pub fn git_ignore_clear_internal_rules(repo
: *mut git_repository
) -> c_int
;
2124 pub fn git_ignore_path_is_ignored(
2125 ignored
: *mut c_int
,
2126 repo
: *mut git_repository
,
2127 path
: *const c_char
,
2131 pub fn git_revparse(
2132 revspec
: *mut git_revspec
,
2133 repo
: *mut git_repository
,
2134 spec
: *const c_char
,
2136 pub fn git_revparse_single(
2137 out
: *mut *mut git_object
,
2138 repo
: *mut git_repository
,
2139 spec
: *const c_char
,
2141 pub fn git_revparse_ext(
2142 object_out
: *mut *mut git_object
,
2143 reference_out
: *mut *mut git_reference
,
2144 repo
: *mut git_repository
,
2145 spec
: *const c_char
,
2149 pub fn git_object_dup(dest
: *mut *mut git_object
, source
: *mut git_object
) -> c_int
;
2150 pub fn git_object_id(obj
: *const git_object
) -> *const git_oid
;
2151 pub fn git_object_free(object
: *mut git_object
);
2152 pub fn git_object_lookup(
2153 dest
: *mut *mut git_object
,
2154 repo
: *mut git_repository
,
2158 pub fn git_object_type(obj
: *const git_object
) -> git_object_t
;
2159 pub fn git_object_peel(
2160 peeled
: *mut *mut git_object
,
2161 object
: *const git_object
,
2162 target_type
: git_object_t
,
2164 pub fn git_object_short_id(out
: *mut git_buf
, obj
: *const git_object
) -> c_int
;
2165 pub fn git_object_type2string(kind
: git_object_t
) -> *const c_char
;
2166 pub fn git_object_string2type(s
: *const c_char
) -> git_object_t
;
2167 pub fn git_object_typeisloose(kind
: git_object_t
) -> c_int
;
2170 pub fn git_oid_fromraw(out
: *mut git_oid
, raw
: *const c_uchar
) -> c_int
;
2171 pub fn git_oid_fromstrn(out
: *mut git_oid
, str: *const c_char
, len
: size_t
) -> c_int
;
2172 pub fn git_oid_tostr(out
: *mut c_char
, n
: size_t
, id
: *const git_oid
) -> *mut c_char
;
2173 pub fn git_oid_cmp(a
: *const git_oid
, b
: *const git_oid
) -> c_int
;
2174 pub fn git_oid_equal(a
: *const git_oid
, b
: *const git_oid
) -> c_int
;
2175 pub fn git_oid_streq(id
: *const git_oid
, str: *const c_char
) -> c_int
;
2176 pub fn git_oid_iszero(id
: *const git_oid
) -> c_int
;
2179 pub fn git_error_last() -> *const git_error
;
2180 pub fn git_error_clear();
2181 pub fn git_error_set_str(error_class
: c_int
, string
: *const c_char
) -> c_int
;
2184 pub fn git_remote_create(
2185 out
: *mut *mut git_remote
,
2186 repo
: *mut git_repository
,
2187 name
: *const c_char
,
2190 pub fn git_remote_create_with_fetchspec(
2191 out
: *mut *mut git_remote
,
2192 repo
: *mut git_repository
,
2193 name
: *const c_char
,
2195 fetch
: *const c_char
,
2197 pub fn git_remote_lookup(
2198 out
: *mut *mut git_remote
,
2199 repo
: *mut git_repository
,
2200 name
: *const c_char
,
2202 pub fn git_remote_create_anonymous(
2203 out
: *mut *mut git_remote
,
2204 repo
: *mut git_repository
,
2207 pub fn git_remote_create_detached(out
: *mut *mut git_remote
, url
: *const c_char
) -> c_int
;
2208 pub fn git_remote_delete(repo
: *mut git_repository
, name
: *const c_char
) -> c_int
;
2209 pub fn git_remote_free(remote
: *mut git_remote
);
2210 pub fn git_remote_name(remote
: *const git_remote
) -> *const c_char
;
2211 pub fn git_remote_pushurl(remote
: *const git_remote
) -> *const c_char
;
2212 pub fn git_remote_refspec_count(remote
: *const git_remote
) -> size_t
;
2213 pub fn git_remote_url(remote
: *const git_remote
) -> *const c_char
;
2214 pub fn git_remote_connect(
2215 remote
: *mut git_remote
,
2217 callbacks
: *const git_remote_callbacks
,
2218 proxy_opts
: *const git_proxy_options
,
2219 custom_headers
: *const git_strarray
,
2221 pub fn git_remote_connected(remote
: *const git_remote
) -> c_int
;
2222 pub fn git_remote_disconnect(remote
: *mut git_remote
) -> c_int
;
2223 pub fn git_remote_add_fetch(
2224 repo
: *mut git_repository
,
2225 remote
: *const c_char
,
2226 refspec
: *const c_char
,
2228 pub fn git_remote_add_push(
2229 repo
: *mut git_repository
,
2230 remote
: *const c_char
,
2231 refspec
: *const c_char
,
2233 pub fn git_remote_download(
2234 remote
: *mut git_remote
,
2235 refspecs
: *const git_strarray
,
2236 opts
: *const git_fetch_options
,
2238 pub fn git_remote_stop(remote
: *mut git_remote
) -> c_int
;
2239 pub fn git_remote_dup(dest
: *mut *mut git_remote
, source
: *mut git_remote
) -> c_int
;
2240 pub fn git_remote_get_fetch_refspecs(
2241 array
: *mut git_strarray
,
2242 remote
: *const git_remote
,
2244 pub fn git_remote_get_push_refspecs(
2245 array
: *mut git_strarray
,
2246 remote
: *const git_remote
,
2248 pub fn git_remote_get_refspec(remote
: *const git_remote
, n
: size_t
) -> *const git_refspec
;
2249 pub fn git_remote_is_valid_name(remote_name
: *const c_char
) -> c_int
;
2250 pub fn git_remote_list(out
: *mut git_strarray
, repo
: *mut git_repository
) -> c_int
;
2251 pub fn git_remote_rename(
2252 problems
: *mut git_strarray
,
2253 repo
: *mut git_repository
,
2254 name
: *const c_char
,
2255 new_name
: *const c_char
,
2257 pub fn git_remote_fetch(
2258 remote
: *mut git_remote
,
2259 refspecs
: *const git_strarray
,
2260 opts
: *const git_fetch_options
,
2261 reflog_message
: *const c_char
,
2263 pub fn git_remote_push(
2264 remote
: *mut git_remote
,
2265 refspecs
: *const git_strarray
,
2266 opts
: *const git_push_options
,
2268 pub fn git_remote_update_tips(
2269 remote
: *mut git_remote
,
2270 callbacks
: *const git_remote_callbacks
,
2271 update_fetchead
: c_int
,
2272 download_tags
: git_remote_autotag_option_t
,
2273 reflog_message
: *const c_char
,
2275 pub fn git_remote_set_url(
2276 repo
: *mut git_repository
,
2277 remote
: *const c_char
,
2280 pub fn git_remote_set_pushurl(
2281 repo
: *mut git_repository
,
2282 remote
: *const c_char
,
2283 pushurl
: *const c_char
,
2285 pub fn git_remote_init_callbacks(opts
: *mut git_remote_callbacks
, version
: c_uint
) -> c_int
;
2286 pub fn git_fetch_init_options(opts
: *mut git_fetch_options
, version
: c_uint
) -> c_int
;
2287 pub fn git_remote_stats(remote
: *mut git_remote
) -> *const git_indexer_progress
;
2288 pub fn git_remote_ls(
2289 out
: *mut *mut *const git_remote_head
,
2291 remote
: *mut git_remote
,
2293 pub fn git_remote_set_autotag(
2294 repo
: *mut git_repository
,
2295 remote
: *const c_char
,
2296 value
: git_remote_autotag_option_t
,
2298 pub fn git_remote_prune(
2299 remote
: *mut git_remote
,
2300 callbacks
: *const git_remote_callbacks
,
2302 pub fn git_remote_default_branch(out
: *mut git_buf
, remote
: *mut git_remote
) -> c_int
;
2305 pub fn git_refspec_direction(spec
: *const git_refspec
) -> git_direction
;
2306 pub fn git_refspec_dst(spec
: *const git_refspec
) -> *const c_char
;
2307 pub fn git_refspec_dst_matches(spec
: *const git_refspec
, refname
: *const c_char
) -> c_int
;
2308 pub fn git_refspec_src(spec
: *const git_refspec
) -> *const c_char
;
2309 pub fn git_refspec_src_matches(spec
: *const git_refspec
, refname
: *const c_char
) -> c_int
;
2310 pub fn git_refspec_force(spec
: *const git_refspec
) -> c_int
;
2311 pub fn git_refspec_string(spec
: *const git_refspec
) -> *const c_char
;
2312 pub fn git_refspec_transform(
2314 spec
: *const git_refspec
,
2315 name
: *const c_char
,
2317 pub fn git_refspec_rtransform(
2319 spec
: *const git_refspec
,
2320 name
: *const c_char
,
2324 pub fn git_strarray_free(array
: *mut git_strarray
);
2327 pub fn git_oidarray_free(array
: *mut git_oidarray
);
2330 pub fn git_signature_default(out
: *mut *mut git_signature
, repo
: *mut git_repository
) -> c_int
;
2331 pub fn git_signature_free(sig
: *mut git_signature
);
2332 pub fn git_signature_new(
2333 out
: *mut *mut git_signature
,
2334 name
: *const c_char
,
2335 email
: *const c_char
,
2339 pub fn git_signature_now(
2340 out
: *mut *mut git_signature
,
2341 name
: *const c_char
,
2342 email
: *const c_char
,
2344 pub fn git_signature_dup(dest
: *mut *mut git_signature
, sig
: *const git_signature
) -> c_int
;
2347 pub fn git_status_list_new(
2348 out
: *mut *mut git_status_list
,
2349 repo
: *mut git_repository
,
2350 options
: *const git_status_options
,
2352 pub fn git_status_list_entrycount(list
: *mut git_status_list
) -> size_t
;
2353 pub fn git_status_byindex(
2354 statuslist
: *mut git_status_list
,
2356 ) -> *const git_status_entry
;
2357 pub fn git_status_list_free(list
: *mut git_status_list
);
2358 pub fn git_status_init_options(opts
: *mut git_status_options
, version
: c_uint
) -> c_int
;
2359 pub fn git_status_file(
2360 status_flags
: *mut c_uint
,
2361 repo
: *mut git_repository
,
2362 path
: *const c_char
,
2364 pub fn git_status_should_ignore(
2365 ignored
: *mut c_int
,
2366 repo
: *mut git_repository
,
2367 path
: *const c_char
,
2372 out
: *mut *mut git_repository
,
2374 local_path
: *const c_char
,
2375 options
: *const git_clone_options
,
2377 pub fn git_clone_init_options(opts
: *mut git_clone_options
, version
: c_uint
) -> c_int
;
2381 repo
: *mut git_repository
,
2382 target
: *const git_object
,
2383 reset_type
: git_reset_t
,
2384 checkout_opts
: *const git_checkout_options
,
2386 pub fn git_reset_default(
2387 repo
: *mut git_repository
,
2388 target
: *const git_object
,
2389 pathspecs
: *const git_strarray
,
2393 pub fn git_reference_cmp(ref1
: *const git_reference
, ref2
: *const git_reference
) -> c_int
;
2394 pub fn git_reference_delete(r
: *mut git_reference
) -> c_int
;
2395 pub fn git_reference_free(r
: *mut git_reference
);
2396 pub fn git_reference_is_branch(r
: *const git_reference
) -> c_int
;
2397 pub fn git_reference_is_note(r
: *const git_reference
) -> c_int
;
2398 pub fn git_reference_is_remote(r
: *const git_reference
) -> c_int
;
2399 pub fn git_reference_is_tag(r
: *const git_reference
) -> c_int
;
2400 pub fn git_reference_is_valid_name(name
: *const c_char
) -> c_int
;
2401 pub fn git_reference_lookup(
2402 out
: *mut *mut git_reference
,
2403 repo
: *mut git_repository
,
2404 name
: *const c_char
,
2406 pub fn git_reference_dwim(
2407 out
: *mut *mut git_reference
,
2408 repo
: *mut git_repository
,
2409 refname
: *const c_char
,
2411 pub fn git_reference_name(r
: *const git_reference
) -> *const c_char
;
2412 pub fn git_reference_name_to_id(
2414 repo
: *mut git_repository
,
2415 name
: *const c_char
,
2417 pub fn git_reference_peel(
2418 out
: *mut *mut git_object
,
2419 r
: *const git_reference
,
2420 otype
: git_object_t
,
2422 pub fn git_reference_rename(
2423 new_ref
: *mut *mut git_reference
,
2424 r
: *mut git_reference
,
2425 new_name
: *const c_char
,
2427 log_message
: *const c_char
,
2429 pub fn git_reference_resolve(out
: *mut *mut git_reference
, r
: *const git_reference
) -> c_int
;
2430 pub fn git_reference_shorthand(r
: *const git_reference
) -> *const c_char
;
2431 pub fn git_reference_symbolic_target(r
: *const git_reference
) -> *const c_char
;
2432 pub fn git_reference_target(r
: *const git_reference
) -> *const git_oid
;
2433 pub fn git_reference_target_peel(r
: *const git_reference
) -> *const git_oid
;
2434 pub fn git_reference_set_target(
2435 out
: *mut *mut git_reference
,
2436 r
: *mut git_reference
,
2438 log_message
: *const c_char
,
2440 pub fn git_reference_type(r
: *const git_reference
) -> git_reference_t
;
2441 pub fn git_reference_iterator_new(
2442 out
: *mut *mut git_reference_iterator
,
2443 repo
: *mut git_repository
,
2445 pub fn git_reference_iterator_glob_new(
2446 out
: *mut *mut git_reference_iterator
,
2447 repo
: *mut git_repository
,
2448 glob
: *const c_char
,
2450 pub fn git_reference_iterator_free(iter
: *mut git_reference_iterator
);
2451 pub fn git_reference_next(
2452 out
: *mut *mut git_reference
,
2453 iter
: *mut git_reference_iterator
,
2455 pub fn git_reference_next_name(
2456 out
: *mut *const c_char
,
2457 iter
: *mut git_reference_iterator
,
2459 pub fn git_reference_create(
2460 out
: *mut *mut git_reference
,
2461 repo
: *mut git_repository
,
2462 name
: *const c_char
,
2465 log_message
: *const c_char
,
2467 pub fn git_reference_symbolic_create(
2468 out
: *mut *mut git_reference
,
2469 repo
: *mut git_repository
,
2470 name
: *const c_char
,
2471 target
: *const c_char
,
2473 log_message
: *const c_char
,
2475 pub fn git_reference_create_matching(
2476 out
: *mut *mut git_reference
,
2477 repo
: *mut git_repository
,
2478 name
: *const c_char
,
2481 current_id
: *const git_oid
,
2482 log_message
: *const c_char
,
2484 pub fn git_reference_symbolic_create_matching(
2485 out
: *mut *mut git_reference
,
2486 repo
: *mut git_repository
,
2487 name
: *const c_char
,
2488 target
: *const c_char
,
2490 current_id
: *const c_char
,
2491 log_message
: *const c_char
,
2493 pub fn git_reference_has_log(repo
: *mut git_repository
, name
: *const c_char
) -> c_int
;
2494 pub fn git_reference_ensure_log(repo
: *mut git_repository
, name
: *const c_char
) -> c_int
;
2495 pub fn git_reference_normalize_name(
2496 buffer_out
: *mut c_char
,
2497 buffer_size
: size_t
,
2498 name
: *const c_char
,
2503 pub fn git_stash_save(
2505 repo
: *mut git_repository
,
2506 stasher
: *const git_signature
,
2507 message
: *const c_char
,
2511 pub fn git_stash_apply_init_options(
2512 opts
: *mut git_stash_apply_options
,
2516 pub fn git_stash_apply(
2517 repo
: *mut git_repository
,
2519 options
: *const git_stash_apply_options
,
2522 pub fn git_stash_foreach(
2523 repo
: *mut git_repository
,
2524 callback
: git_stash_cb
,
2525 payload
: *mut c_void
,
2528 pub fn git_stash_drop(repo
: *mut git_repository
, index
: size_t
) -> c_int
;
2530 pub fn git_stash_pop(
2531 repo
: *mut git_repository
,
2533 options
: *const git_stash_apply_options
,
2537 pub fn git_submodule_add_finalize(submodule
: *mut git_submodule
) -> c_int
;
2538 pub fn git_submodule_add_setup(
2539 submodule
: *mut *mut git_submodule
,
2540 repo
: *mut git_repository
,
2542 path
: *const c_char
,
2545 pub fn git_submodule_add_to_index(submodule
: *mut git_submodule
, write_index
: c_int
) -> c_int
;
2546 pub fn git_submodule_branch(submodule
: *mut git_submodule
) -> *const c_char
;
2547 pub fn git_submodule_clone(
2548 repo
: *mut *mut git_repository
,
2549 submodule
: *mut git_submodule
,
2550 opts
: *const git_submodule_update_options
,
2552 pub fn git_submodule_foreach(
2553 repo
: *mut git_repository
,
2554 callback
: git_submodule_cb
,
2555 payload
: *mut c_void
,
2557 pub fn git_submodule_free(submodule
: *mut git_submodule
);
2558 pub fn git_submodule_head_id(submodule
: *mut git_submodule
) -> *const git_oid
;
2559 pub fn git_submodule_ignore(submodule
: *mut git_submodule
) -> git_submodule_ignore_t
;
2560 pub fn git_submodule_index_id(submodule
: *mut git_submodule
) -> *const git_oid
;
2561 pub fn git_submodule_init(submodule
: *mut git_submodule
, overwrite
: c_int
) -> c_int
;
2562 pub fn git_submodule_location(status
: *mut c_uint
, submodule
: *mut git_submodule
) -> c_int
;
2563 pub fn git_submodule_lookup(
2564 out
: *mut *mut git_submodule
,
2565 repo
: *mut git_repository
,
2566 name
: *const c_char
,
2568 pub fn git_submodule_name(submodule
: *mut git_submodule
) -> *const c_char
;
2569 pub fn git_submodule_open(
2570 repo
: *mut *mut git_repository
,
2571 submodule
: *mut git_submodule
,
2573 pub fn git_submodule_path(submodule
: *mut git_submodule
) -> *const c_char
;
2574 pub fn git_submodule_reload(submodule
: *mut git_submodule
, force
: c_int
) -> c_int
;
2575 pub fn git_submodule_set_ignore(
2576 repo
: *mut git_repository
,
2577 name
: *const c_char
,
2578 ignore
: git_submodule_ignore_t
,
2580 pub fn git_submodule_set_update(
2581 repo
: *mut git_repository
,
2582 name
: *const c_char
,
2583 update
: git_submodule_update_t
,
2585 pub fn git_submodule_set_url(
2586 repo
: *mut git_repository
,
2587 name
: *const c_char
,
2590 pub fn git_submodule_sync(submodule
: *mut git_submodule
) -> c_int
;
2591 pub fn git_submodule_update_strategy(submodule
: *mut git_submodule
) -> git_submodule_update_t
;
2592 pub fn git_submodule_update(
2593 submodule
: *mut git_submodule
,
2595 options
: *mut git_submodule_update_options
,
2597 pub fn git_submodule_update_init_options(
2598 options
: *mut git_submodule_update_options
,
2601 pub fn git_submodule_url(submodule
: *mut git_submodule
) -> *const c_char
;
2602 pub fn git_submodule_wd_id(submodule
: *mut git_submodule
) -> *const git_oid
;
2603 pub fn git_submodule_status(
2604 status
: *mut c_uint
,
2605 repo
: *mut git_repository
,
2606 name
: *const c_char
,
2607 ignore
: git_submodule_ignore_t
,
2609 pub fn git_submodule_set_branch(
2610 repo
: *mut git_repository
,
2611 name
: *const c_char
,
2612 branch
: *const c_char
,
2616 pub fn git_blob_free(blob
: *mut git_blob
);
2617 pub fn git_blob_id(blob
: *const git_blob
) -> *const git_oid
;
2618 pub fn git_blob_is_binary(blob
: *const git_blob
) -> c_int
;
2619 pub fn git_blob_lookup(
2620 blob
: *mut *mut git_blob
,
2621 repo
: *mut git_repository
,
2624 pub fn git_blob_lookup_prefix(
2625 blob
: *mut *mut git_blob
,
2626 repo
: *mut git_repository
,
2630 pub fn git_blob_rawcontent(blob
: *const git_blob
) -> *const c_void
;
2631 pub fn git_blob_rawsize(blob
: *const git_blob
) -> git_object_size_t
;
2632 pub fn git_blob_create_frombuffer(
2634 repo
: *mut git_repository
,
2635 buffer
: *const c_void
,
2638 pub fn git_blob_create_fromdisk(
2640 repo
: *mut git_repository
,
2641 path
: *const c_char
,
2643 pub fn git_blob_create_fromworkdir(
2645 repo
: *mut git_repository
,
2646 relative_path
: *const c_char
,
2648 pub fn git_blob_create_fromstream(
2649 out
: *mut *mut git_writestream
,
2650 repo
: *mut git_repository
,
2651 hintpath
: *const c_char
,
2653 pub fn git_blob_create_fromstream_commit(
2655 stream
: *mut git_writestream
,
2659 pub fn git_tree_entry_byid(tree
: *const git_tree
, id
: *const git_oid
) -> *const git_tree_entry
;
2660 pub fn git_tree_entry_byindex(tree
: *const git_tree
, idx
: size_t
) -> *const git_tree_entry
;
2661 pub fn git_tree_entry_byname(
2662 tree
: *const git_tree
,
2663 filename
: *const c_char
,
2664 ) -> *const git_tree_entry
;
2665 pub fn git_tree_entry_bypath(
2666 out
: *mut *mut git_tree_entry
,
2667 tree
: *const git_tree
,
2668 filename
: *const c_char
,
2670 pub fn git_tree_entry_cmp(e1
: *const git_tree_entry
, e2
: *const git_tree_entry
) -> c_int
;
2671 pub fn git_tree_entry_dup(dest
: *mut *mut git_tree_entry
, src
: *const git_tree_entry
) -> c_int
;
2672 pub fn git_tree_entry_filemode(entry
: *const git_tree_entry
) -> git_filemode_t
;
2673 pub fn git_tree_entry_filemode_raw(entry
: *const git_tree_entry
) -> git_filemode_t
;
2674 pub fn git_tree_entry_free(entry
: *mut git_tree_entry
);
2675 pub fn git_tree_entry_id(entry
: *const git_tree_entry
) -> *const git_oid
;
2676 pub fn git_tree_entry_name(entry
: *const git_tree_entry
) -> *const c_char
;
2677 pub fn git_tree_entry_to_object(
2678 out
: *mut *mut git_object
,
2679 repo
: *mut git_repository
,
2680 entry
: *const git_tree_entry
,
2682 pub fn git_tree_entry_type(entry
: *const git_tree_entry
) -> git_object_t
;
2683 pub fn git_tree_entrycount(tree
: *const git_tree
) -> size_t
;
2684 pub fn git_tree_free(tree
: *mut git_tree
);
2685 pub fn git_tree_id(tree
: *const git_tree
) -> *const git_oid
;
2686 pub fn git_tree_lookup(
2687 tree
: *mut *mut git_tree
,
2688 repo
: *mut git_repository
,
2691 pub fn git_tree_walk(
2692 tree
: *const git_tree
,
2693 mode
: git_treewalk_mode
,
2694 callback
: git_treewalk_cb
,
2695 payload
: *mut c_void
,
2697 pub fn git_tree_create_updated(
2699 repo
: *mut git_repository
,
2700 baseline
: *mut git_tree
,
2702 updates
: *const git_tree_update
,
2706 pub fn git_treebuilder_new(
2707 out
: *mut *mut git_treebuilder
,
2708 repo
: *mut git_repository
,
2709 source
: *const git_tree
,
2711 pub fn git_treebuilder_clear(bld
: *mut git_treebuilder
) -> c_int
;
2712 pub fn git_treebuilder_entrycount(bld
: *mut git_treebuilder
) -> size_t
;
2713 pub fn git_treebuilder_free(bld
: *mut git_treebuilder
);
2714 pub fn git_treebuilder_get(
2715 bld
: *mut git_treebuilder
,
2716 filename
: *const c_char
,
2717 ) -> *const git_tree_entry
;
2718 pub fn git_treebuilder_insert(
2719 out
: *mut *const git_tree_entry
,
2720 bld
: *mut git_treebuilder
,
2721 filename
: *const c_char
,
2723 filemode
: git_filemode_t
,
2725 pub fn git_treebuilder_remove(bld
: *mut git_treebuilder
, filename
: *const c_char
) -> c_int
;
2726 pub fn git_treebuilder_filter(
2727 bld
: *mut git_treebuilder
,
2728 filter
: git_treebuilder_filter_cb
,
2729 payload
: *mut c_void
,
2731 pub fn git_treebuilder_write(id
: *mut git_oid
, bld
: *mut git_treebuilder
) -> c_int
;
2734 pub fn git_buf_dispose(buffer
: *mut git_buf
);
2735 pub fn git_buf_grow(buffer
: *mut git_buf
, target_size
: size_t
) -> c_int
;
2736 pub fn git_buf_set(buffer
: *mut git_buf
, data
: *const c_void
, datalen
: size_t
) -> c_int
;
2739 pub fn git_commit_author(commit
: *const git_commit
) -> *const git_signature
;
2740 pub fn git_commit_author_with_mailmap(
2741 out
: *mut *mut git_signature
,
2742 commit
: *const git_commit
,
2743 mailmap
: *const git_mailmap
,
2745 pub fn git_commit_committer(commit
: *const git_commit
) -> *const git_signature
;
2746 pub fn git_commit_committer_with_mailmap(
2747 out
: *mut *mut git_signature
,
2748 commit
: *const git_commit
,
2749 mailmap
: *const git_mailmap
,
2751 pub fn git_commit_free(commit
: *mut git_commit
);
2752 pub fn git_commit_id(commit
: *const git_commit
) -> *const git_oid
;
2753 pub fn git_commit_lookup(
2754 commit
: *mut *mut git_commit
,
2755 repo
: *mut git_repository
,
2758 pub fn git_commit_message(commit
: *const git_commit
) -> *const c_char
;
2759 pub fn git_commit_message_encoding(commit
: *const git_commit
) -> *const c_char
;
2760 pub fn git_commit_message_raw(commit
: *const git_commit
) -> *const c_char
;
2761 pub fn git_commit_nth_gen_ancestor(
2762 commit
: *mut *mut git_commit
,
2763 commit
: *const git_commit
,
2766 pub fn git_commit_parent(
2767 out
: *mut *mut git_commit
,
2768 commit
: *const git_commit
,
2771 pub fn git_commit_parent_id(commit
: *const git_commit
, n
: c_uint
) -> *const git_oid
;
2772 pub fn git_commit_parentcount(commit
: *const git_commit
) -> c_uint
;
2773 pub fn git_commit_raw_header(commit
: *const git_commit
) -> *const c_char
;
2774 pub fn git_commit_summary(commit
: *mut git_commit
) -> *const c_char
;
2775 pub fn git_commit_body(commit
: *mut git_commit
) -> *const c_char
;
2776 pub fn git_commit_time(commit
: *const git_commit
) -> git_time_t
;
2777 pub fn git_commit_time_offset(commit
: *const git_commit
) -> c_int
;
2778 pub fn git_commit_tree(tree_out
: *mut *mut git_tree
, commit
: *const git_commit
) -> c_int
;
2779 pub fn git_commit_tree_id(commit
: *const git_commit
) -> *const git_oid
;
2780 pub fn git_commit_amend(
2782 commit_to_amend
: *const git_commit
,
2783 update_ref
: *const c_char
,
2784 author
: *const git_signature
,
2785 committer
: *const git_signature
,
2786 message_encoding
: *const c_char
,
2787 message
: *const c_char
,
2788 tree
: *const git_tree
,
2790 pub fn git_commit_create(
2792 repo
: *mut git_repository
,
2793 update_ref
: *const c_char
,
2794 author
: *const git_signature
,
2795 committer
: *const git_signature
,
2796 message_encoding
: *const c_char
,
2797 message
: *const c_char
,
2798 tree
: *const git_tree
,
2799 parent_count
: size_t
,
2800 parents
: *mut *const git_commit
,
2802 pub fn git_commit_create_buffer(
2804 repo
: *mut git_repository
,
2805 author
: *const git_signature
,
2806 committer
: *const git_signature
,
2807 message_encoding
: *const c_char
,
2808 message
: *const c_char
,
2809 tree
: *const git_tree
,
2810 parent_count
: size_t
,
2811 parents
: *mut *const git_commit
,
2813 pub fn git_commit_header_field(
2815 commit
: *const git_commit
,
2816 field
: *const c_char
,
2818 pub fn git_annotated_commit_lookup(
2819 out
: *mut *mut git_annotated_commit
,
2820 repo
: *mut git_repository
,
2823 pub fn git_commit_create_with_signature(
2825 repo
: *mut git_repository
,
2826 commit_content
: *const c_char
,
2827 signature
: *const c_char
,
2828 signature_field
: *const c_char
,
2830 pub fn git_commit_extract_signature(
2831 signature
: *mut git_buf
,
2832 signed_data
: *mut git_buf
,
2833 repo
: *mut git_repository
,
2834 commit_id
: *mut git_oid
,
2835 field
: *const c_char
,
2839 pub fn git_branch_create(
2840 out
: *mut *mut git_reference
,
2841 repo
: *mut git_repository
,
2842 branch_name
: *const c_char
,
2843 target
: *const git_commit
,
2846 pub fn git_branch_create_from_annotated(
2847 ref_out
: *mut *mut git_reference
,
2848 repository
: *mut git_repository
,
2849 branch_name
: *const c_char
,
2850 commit
: *const git_annotated_commit
,
2853 pub fn git_branch_delete(branch
: *mut git_reference
) -> c_int
;
2854 pub fn git_branch_is_head(branch
: *const git_reference
) -> c_int
;
2855 pub fn git_branch_iterator_free(iter
: *mut git_branch_iterator
);
2856 pub fn git_branch_iterator_new(
2857 iter
: *mut *mut git_branch_iterator
,
2858 repo
: *mut git_repository
,
2859 list_flags
: git_branch_t
,
2861 pub fn git_branch_lookup(
2862 out
: *mut *mut git_reference
,
2863 repo
: *mut git_repository
,
2864 branch_name
: *const c_char
,
2865 branch_type
: git_branch_t
,
2867 pub fn git_branch_move(
2868 out
: *mut *mut git_reference
,
2869 branch
: *mut git_reference
,
2870 new_branch_name
: *const c_char
,
2873 pub fn git_branch_name(out
: *mut *const c_char
, branch
: *const git_reference
) -> c_int
;
2874 pub fn git_branch_name_is_valid(valid
: *mut c_int
, name
: *const c_char
) -> c_int
;
2875 pub fn git_branch_remote_name(
2877 repo
: *mut git_repository
,
2878 refname
: *const c_char
,
2880 pub fn git_branch_next(
2881 out
: *mut *mut git_reference
,
2882 out_type
: *mut git_branch_t
,
2883 iter
: *mut git_branch_iterator
,
2885 pub fn git_branch_set_upstream(
2886 branch
: *mut git_reference
,
2887 upstream_name
: *const c_char
,
2889 pub fn git_branch_upstream(out
: *mut *mut git_reference
, branch
: *const git_reference
)
2891 pub fn git_branch_upstream_name(
2893 repo
: *mut git_repository
,
2894 refname
: *const c_char
,
2896 pub fn git_branch_upstream_remote(
2898 repo
: *mut git_repository
,
2899 refname
: *const c_char
,
2903 pub fn git_index_version(index
: *mut git_index
) -> c_uint
;
2904 pub fn git_index_set_version(index
: *mut git_index
, version
: c_uint
) -> c_int
;
2905 pub fn git_index_add(index
: *mut git_index
, entry
: *const git_index_entry
) -> c_int
;
2906 pub fn git_index_add_all(
2907 index
: *mut git_index
,
2908 pathspec
: *const git_strarray
,
2910 callback
: git_index_matched_path_cb
,
2911 payload
: *mut c_void
,
2913 pub fn git_index_add_bypath(index
: *mut git_index
, path
: *const c_char
) -> c_int
;
2914 pub fn git_index_add_frombuffer(
2915 index
: *mut git_index
,
2916 entry
: *const git_index_entry
,
2917 buffer
: *const c_void
,
2920 pub fn git_index_conflict_add(
2921 index
: *mut git_index
,
2922 ancestor_entry
: *const git_index_entry
,
2923 our_entry
: *const git_index_entry
,
2924 their_entry
: *const git_index_entry
,
2926 pub fn git_index_conflict_remove(index
: *mut git_index
, path
: *const c_char
) -> c_int
;
2927 pub fn git_index_conflict_get(
2928 ancestor_out
: *mut *const git_index_entry
,
2929 our_out
: *mut *const git_index_entry
,
2930 their_out
: *mut *const git_index_entry
,
2931 index
: *mut git_index
,
2932 path
: *const c_char
,
2934 pub fn git_index_conflict_iterator_new(
2935 iter
: *mut *mut git_index_conflict_iterator
,
2936 index
: *mut git_index
,
2938 pub fn git_index_conflict_next(
2939 ancestor_out
: *mut *const git_index_entry
,
2940 our_out
: *mut *const git_index_entry
,
2941 their_out
: *mut *const git_index_entry
,
2942 iter
: *mut git_index_conflict_iterator
,
2944 pub fn git_index_conflict_iterator_free(iter
: *mut git_index_conflict_iterator
);
2945 pub fn git_index_clear(index
: *mut git_index
) -> c_int
;
2946 pub fn git_index_entry_stage(entry
: *const git_index_entry
) -> c_int
;
2947 pub fn git_index_entrycount(entry
: *const git_index
) -> size_t
;
2948 pub fn git_index_find(at_pos
: *mut size_t
, index
: *mut git_index
, path
: *const c_char
)
2950 pub fn git_index_free(index
: *mut git_index
);
2951 pub fn git_index_get_byindex(index
: *mut git_index
, n
: size_t
) -> *const git_index_entry
;
2952 pub fn git_index_get_bypath(
2953 index
: *mut git_index
,
2954 path
: *const c_char
,
2956 ) -> *const git_index_entry
;
2957 pub fn git_index_has_conflicts(index
: *const git_index
) -> c_int
;
2958 pub fn git_index_new(index
: *mut *mut git_index
) -> c_int
;
2959 pub fn git_index_open(index
: *mut *mut git_index
, index_path
: *const c_char
) -> c_int
;
2960 pub fn git_index_path(index
: *const git_index
) -> *const c_char
;
2961 pub fn git_index_read(index
: *mut git_index
, force
: c_int
) -> c_int
;
2962 pub fn git_index_read_tree(index
: *mut git_index
, tree
: *const git_tree
) -> c_int
;
2963 pub fn git_index_remove(index
: *mut git_index
, path
: *const c_char
, stage
: c_int
) -> c_int
;
2964 pub fn git_index_remove_all(
2965 index
: *mut git_index
,
2966 pathspec
: *const git_strarray
,
2967 callback
: git_index_matched_path_cb
,
2968 payload
: *mut c_void
,
2970 pub fn git_index_remove_bypath(index
: *mut git_index
, path
: *const c_char
) -> c_int
;
2971 pub fn git_index_remove_directory(
2972 index
: *mut git_index
,
2976 pub fn git_index_update_all(
2977 index
: *mut git_index
,
2978 pathspec
: *const git_strarray
,
2979 callback
: git_index_matched_path_cb
,
2980 payload
: *mut c_void
,
2982 pub fn git_index_write(index
: *mut git_index
) -> c_int
;
2983 pub fn git_index_write_tree(out
: *mut git_oid
, index
: *mut git_index
) -> c_int
;
2984 pub fn git_index_write_tree_to(
2986 index
: *mut git_index
,
2987 repo
: *mut git_repository
,
2991 pub fn git_config_add_file_ondisk(
2992 cfg
: *mut git_config
,
2993 path
: *const c_char
,
2994 level
: git_config_level_t
,
2995 repo
: *const git_repository
,
2998 pub fn git_config_delete_entry(cfg
: *mut git_config
, name
: *const c_char
) -> c_int
;
2999 pub fn git_config_delete_multivar(
3000 cfg
: *mut git_config
,
3001 name
: *const c_char
,
3002 regexp
: *const c_char
,
3004 pub fn git_config_find_programdata(out
: *mut git_buf
) -> c_int
;
3005 pub fn git_config_find_global(out
: *mut git_buf
) -> c_int
;
3006 pub fn git_config_find_system(out
: *mut git_buf
) -> c_int
;
3007 pub fn git_config_find_xdg(out
: *mut git_buf
) -> c_int
;
3008 pub fn git_config_free(cfg
: *mut git_config
);
3009 pub fn git_config_get_bool(
3011 cfg
: *const git_config
,
3012 name
: *const c_char
,
3014 pub fn git_config_get_entry(
3015 out
: *mut *mut git_config_entry
,
3016 cfg
: *const git_config
,
3017 name
: *const c_char
,
3019 pub fn git_config_get_int32(
3021 cfg
: *const git_config
,
3022 name
: *const c_char
,
3024 pub fn git_config_get_int64(
3026 cfg
: *const git_config
,
3027 name
: *const c_char
,
3029 pub fn git_config_get_string(
3030 out
: *mut *const c_char
,
3031 cfg
: *const git_config
,
3032 name
: *const c_char
,
3034 pub fn git_config_get_string_buf(
3036 cfg
: *const git_config
,
3037 name
: *const c_char
,
3039 pub fn git_config_get_path(
3041 cfg
: *const git_config
,
3042 name
: *const c_char
,
3044 pub fn git_config_iterator_free(iter
: *mut git_config_iterator
);
3045 pub fn git_config_iterator_glob_new(
3046 out
: *mut *mut git_config_iterator
,
3047 cfg
: *const git_config
,
3048 regexp
: *const c_char
,
3050 pub fn git_config_iterator_new(
3051 out
: *mut *mut git_config_iterator
,
3052 cfg
: *const git_config
,
3054 pub fn git_config_new(out
: *mut *mut git_config
) -> c_int
;
3055 pub fn git_config_next(
3056 entry
: *mut *mut git_config_entry
,
3057 iter
: *mut git_config_iterator
,
3059 pub fn git_config_open_default(out
: *mut *mut git_config
) -> c_int
;
3060 pub fn git_config_open_global(out
: *mut *mut git_config
, config
: *mut git_config
) -> c_int
;
3061 pub fn git_config_open_level(
3062 out
: *mut *mut git_config
,
3063 parent
: *const git_config
,
3064 level
: git_config_level_t
,
3066 pub fn git_config_open_ondisk(out
: *mut *mut git_config
, path
: *const c_char
) -> c_int
;
3067 pub fn git_config_parse_bool(out
: *mut c_int
, value
: *const c_char
) -> c_int
;
3068 pub fn git_config_parse_int32(out
: *mut i32, value
: *const c_char
) -> c_int
;
3069 pub fn git_config_parse_int64(out
: *mut i64, value
: *const c_char
) -> c_int
;
3070 pub fn git_config_set_bool(cfg
: *mut git_config
, name
: *const c_char
, value
: c_int
) -> c_int
;
3071 pub fn git_config_set_int32(cfg
: *mut git_config
, name
: *const c_char
, value
: i32) -> c_int
;
3072 pub fn git_config_set_int64(cfg
: *mut git_config
, name
: *const c_char
, value
: i64) -> c_int
;
3073 pub fn git_config_set_multivar(
3074 cfg
: *mut git_config
,
3075 name
: *const c_char
,
3076 regexp
: *const c_char
,
3077 value
: *const c_char
,
3079 pub fn git_config_set_string(
3080 cfg
: *mut git_config
,
3081 name
: *const c_char
,
3082 value
: *const c_char
,
3084 pub fn git_config_snapshot(out
: *mut *mut git_config
, config
: *mut git_config
) -> c_int
;
3085 pub fn git_config_entry_free(entry
: *mut git_config_entry
);
3086 pub fn git_config_multivar_iterator_new(
3087 out
: *mut *mut git_config_iterator
,
3088 cfg
: *const git_config
,
3089 name
: *const c_char
,
3090 regexp
: *const c_char
,
3094 pub fn git_attr_get(
3095 value_out
: *mut *const c_char
,
3096 repo
: *mut git_repository
,
3098 path
: *const c_char
,
3099 name
: *const c_char
,
3101 pub fn git_attr_value(value
: *const c_char
) -> git_attr_value_t
;
3104 pub fn git_cred_default_new(out
: *mut *mut git_cred
) -> c_int
;
3105 pub fn git_cred_has_username(cred
: *mut git_cred
) -> c_int
;
3106 pub fn git_cred_ssh_custom_new(
3107 out
: *mut *mut git_cred
,
3108 username
: *const c_char
,
3109 publickey
: *const c_char
,
3110 publickey_len
: size_t
,
3111 sign_callback
: git_cred_sign_callback
,
3112 payload
: *mut c_void
,
3114 pub fn git_cred_ssh_interactive_new(
3115 out
: *mut *mut git_cred
,
3116 username
: *const c_char
,
3117 prompt_callback
: git_cred_ssh_interactive_callback
,
3118 payload
: *mut c_void
,
3120 pub fn git_cred_ssh_key_from_agent(out
: *mut *mut git_cred
, username
: *const c_char
) -> c_int
;
3121 pub fn git_cred_ssh_key_new(
3122 out
: *mut *mut git_cred
,
3123 username
: *const c_char
,
3124 publickey
: *const c_char
,
3125 privatekey
: *const c_char
,
3126 passphrase
: *const c_char
,
3128 pub fn git_cred_ssh_key_memory_new(
3129 out
: *mut *mut git_cred
,
3130 username
: *const c_char
,
3131 publickey
: *const c_char
,
3132 privatekey
: *const c_char
,
3133 passphrase
: *const c_char
,
3135 pub fn git_cred_userpass(
3136 cred
: *mut *mut git_cred
,
3138 user_from_url
: *const c_char
,
3139 allowed_types
: c_uint
,
3140 payload
: *mut c_void
,
3142 pub fn git_cred_userpass_plaintext_new(
3143 out
: *mut *mut git_cred
,
3144 username
: *const c_char
,
3145 password
: *const c_char
,
3147 pub fn git_cred_username_new(cred
: *mut *mut git_cred
, username
: *const c_char
) -> c_int
;
3150 pub fn git_tag_annotation_create(
3152 repo
: *mut git_repository
,
3153 tag_name
: *const c_char
,
3154 target
: *const git_object
,
3155 tagger
: *const git_signature
,
3156 message
: *const c_char
,
3158 pub fn git_tag_create(
3160 repo
: *mut git_repository
,
3161 tag_name
: *const c_char
,
3162 target
: *const git_object
,
3163 tagger
: *const git_signature
,
3164 message
: *const c_char
,
3167 pub fn git_tag_create_frombuffer(
3169 repo
: *mut git_repository
,
3170 buffer
: *const c_char
,
3173 pub fn git_tag_create_lightweight(
3175 repo
: *mut git_repository
,
3176 tag_name
: *const c_char
,
3177 target
: *const git_object
,
3180 pub fn git_tag_delete(repo
: *mut git_repository
, tag_name
: *const c_char
) -> c_int
;
3181 pub fn git_tag_foreach(
3182 repo
: *mut git_repository
,
3183 callback
: git_tag_foreach_cb
,
3184 payload
: *mut c_void
,
3186 pub fn git_tag_free(tag
: *mut git_tag
);
3187 pub fn git_tag_id(tag
: *const git_tag
) -> *const git_oid
;
3188 pub fn git_tag_list(tag_names
: *mut git_strarray
, repo
: *mut git_repository
) -> c_int
;
3189 pub fn git_tag_list_match(
3190 tag_names
: *mut git_strarray
,
3191 pattern
: *const c_char
,
3192 repo
: *mut git_repository
,
3194 pub fn git_tag_lookup(
3195 out
: *mut *mut git_tag
,
3196 repo
: *mut git_repository
,
3199 pub fn git_tag_lookup_prefix(
3200 out
: *mut *mut git_tag
,
3201 repo
: *mut git_repository
,
3205 pub fn git_tag_message(tag
: *const git_tag
) -> *const c_char
;
3206 pub fn git_tag_name(tag
: *const git_tag
) -> *const c_char
;
3207 pub fn git_tag_peel(tag_target_out
: *mut *mut git_object
, tag
: *const git_tag
) -> c_int
;
3208 pub fn git_tag_tagger(tag
: *const git_tag
) -> *const git_signature
;
3209 pub fn git_tag_target(target_out
: *mut *mut git_object
, tag
: *const git_tag
) -> c_int
;
3210 pub fn git_tag_target_id(tag
: *const git_tag
) -> *const git_oid
;
3211 pub fn git_tag_target_type(tag
: *const git_tag
) -> git_object_t
;
3214 pub fn git_checkout_head(repo
: *mut git_repository
, opts
: *const git_checkout_options
)
3216 pub fn git_checkout_index(
3217 repo
: *mut git_repository
,
3218 index
: *mut git_index
,
3219 opts
: *const git_checkout_options
,
3221 pub fn git_checkout_tree(
3222 repo
: *mut git_repository
,
3223 treeish
: *const git_object
,
3224 opts
: *const git_checkout_options
,
3226 pub fn git_checkout_init_options(opts
: *mut git_checkout_options
, version
: c_uint
) -> c_int
;
3229 pub fn git_annotated_commit_id(commit
: *const git_annotated_commit
) -> *const git_oid
;
3230 pub fn git_annotated_commit_ref(commit
: *const git_annotated_commit
) -> *const c_char
;
3231 pub fn git_annotated_commit_from_ref(
3232 out
: *mut *mut git_annotated_commit
,
3233 repo
: *mut git_repository
,
3234 reference
: *const git_reference
,
3236 pub fn git_annotated_commit_from_fetchhead(
3237 out
: *mut *mut git_annotated_commit
,
3238 repo
: *mut git_repository
,
3239 branch_name
: *const c_char
,
3240 remote_url
: *const c_char
,
3241 oid
: *const git_oid
,
3243 pub fn git_annotated_commit_free(commit
: *mut git_annotated_commit
);
3244 pub fn git_merge_init_options(opts
: *mut git_merge_options
, version
: c_uint
) -> c_int
;
3246 repo
: *mut git_repository
,
3247 their_heads
: *mut *const git_annotated_commit
,
3249 merge_opts
: *const git_merge_options
,
3250 checkout_opts
: *const git_checkout_options
,
3252 pub fn git_merge_commits(
3253 out
: *mut *mut git_index
,
3254 repo
: *mut git_repository
,
3255 our_commit
: *const git_commit
,
3256 their_commit
: *const git_commit
,
3257 opts
: *const git_merge_options
,
3259 pub fn git_merge_trees(
3260 out
: *mut *mut git_index
,
3261 repo
: *mut git_repository
,
3262 ancestor_tree
: *const git_tree
,
3263 our_tree
: *const git_tree
,
3264 their_tree
: *const git_tree
,
3265 opts
: *const git_merge_options
,
3267 pub fn git_repository_state_cleanup(repo
: *mut git_repository
) -> c_int
;
3271 pub fn git_merge_analysis(
3272 analysis_out
: *mut git_merge_analysis_t
,
3273 pref_out
: *mut git_merge_preference_t
,
3274 repo
: *mut git_repository
,
3275 their_heads
: *mut *const git_annotated_commit
,
3276 their_heads_len
: usize,
3279 pub fn git_merge_analysis_for_ref(
3280 analysis_out
: *mut git_merge_analysis_t
,
3281 pref_out
: *mut git_merge_preference_t
,
3282 repo
: *mut git_repository
,
3283 git_reference
: *mut git_reference
,
3284 their_heads
: *mut *const git_annotated_commit
,
3285 their_heads_len
: usize,
3289 pub fn git_note_author(note
: *const git_note
) -> *const git_signature
;
3290 pub fn git_note_committer(note
: *const git_note
) -> *const git_signature
;
3291 pub fn git_note_create(
3293 repo
: *mut git_repository
,
3294 notes_ref
: *const c_char
,
3295 author
: *const git_signature
,
3296 committer
: *const git_signature
,
3297 oid
: *const git_oid
,
3298 note
: *const c_char
,
3301 pub fn git_note_default_ref(out
: *mut git_buf
, repo
: *mut git_repository
) -> c_int
;
3302 pub fn git_note_free(note
: *mut git_note
);
3303 pub fn git_note_id(note
: *const git_note
) -> *const git_oid
;
3304 pub fn git_note_iterator_free(it
: *mut git_note_iterator
);
3305 pub fn git_note_iterator_new(
3306 out
: *mut *mut git_note_iterator
,
3307 repo
: *mut git_repository
,
3308 notes_ref
: *const c_char
,
3310 pub fn git_note_message(note
: *const git_note
) -> *const c_char
;
3311 pub fn git_note_next(
3312 note_id
: *mut git_oid
,
3313 annotated_id
: *mut git_oid
,
3314 it
: *mut git_note_iterator
,
3316 pub fn git_note_read(
3317 out
: *mut *mut git_note
,
3318 repo
: *mut git_repository
,
3319 notes_ref
: *const c_char
,
3320 oid
: *const git_oid
,
3322 pub fn git_note_remove(
3323 repo
: *mut git_repository
,
3324 notes_ref
: *const c_char
,
3325 author
: *const git_signature
,
3326 committer
: *const git_signature
,
3327 oid
: *const git_oid
,
3331 pub fn git_blame_file(
3332 out
: *mut *mut git_blame
,
3333 repo
: *mut git_repository
,
3334 path
: *const c_char
,
3335 options
: *mut git_blame_options
,
3337 pub fn git_blame_free(blame
: *mut git_blame
);
3339 pub fn git_blame_init_options(opts
: *mut git_blame_options
, version
: c_uint
) -> c_int
;
3340 pub fn git_blame_get_hunk_count(blame
: *mut git_blame
) -> u32;
3342 pub fn git_blame_get_hunk_byline(blame
: *mut git_blame
, lineno
: usize)
3343 -> *const git_blame_hunk
;
3344 pub fn git_blame_get_hunk_byindex(blame
: *mut git_blame
, index
: u32) -> *const git_blame_hunk
;
3347 pub fn git_revwalk_new(out
: *mut *mut git_revwalk
, repo
: *mut git_repository
) -> c_int
;
3348 pub fn git_revwalk_free(walk
: *mut git_revwalk
);
3350 pub fn git_revwalk_reset(walk
: *mut git_revwalk
) -> c_int
;
3352 pub fn git_revwalk_sorting(walk
: *mut git_revwalk
, sort_mode
: c_uint
) -> c_int
;
3354 pub fn git_revwalk_push_head(walk
: *mut git_revwalk
) -> c_int
;
3355 pub fn git_revwalk_push(walk
: *mut git_revwalk
, oid
: *const git_oid
) -> c_int
;
3356 pub fn git_revwalk_push_ref(walk
: *mut git_revwalk
, refname
: *const c_char
) -> c_int
;
3357 pub fn git_revwalk_push_glob(walk
: *mut git_revwalk
, glob
: *const c_char
) -> c_int
;
3358 pub fn git_revwalk_push_range(walk
: *mut git_revwalk
, range
: *const c_char
) -> c_int
;
3359 pub fn git_revwalk_simplify_first_parent(walk
: *mut git_revwalk
) -> c_int
;
3361 pub fn git_revwalk_hide_head(walk
: *mut git_revwalk
) -> c_int
;
3362 pub fn git_revwalk_hide(walk
: *mut git_revwalk
, oid
: *const git_oid
) -> c_int
;
3363 pub fn git_revwalk_hide_ref(walk
: *mut git_revwalk
, refname
: *const c_char
) -> c_int
;
3364 pub fn git_revwalk_hide_glob(walk
: *mut git_revwalk
, refname
: *const c_char
) -> c_int
;
3365 pub fn git_revwalk_add_hide_cb(
3366 walk
: *mut git_revwalk
,
3367 hide_cb
: git_revwalk_hide_cb
,
3368 payload
: *mut c_void
,
3371 pub fn git_revwalk_next(out
: *mut git_oid
, walk
: *mut git_revwalk
) -> c_int
;
3374 pub fn git_merge_base(
3376 repo
: *mut git_repository
,
3377 one
: *const git_oid
,
3378 two
: *const git_oid
,
3381 pub fn git_merge_base_many(
3383 repo
: *mut git_repository
,
3385 input_array
: *const git_oid
,
3388 pub fn git_merge_bases(
3389 out
: *mut git_oidarray
,
3390 repo
: *mut git_repository
,
3391 one
: *const git_oid
,
3392 two
: *const git_oid
,
3395 pub fn git_merge_bases_many(
3396 out
: *mut git_oidarray
,
3397 repo
: *mut git_repository
,
3399 input_array
: *const git_oid
,
3403 pub fn git_pathspec_free(ps
: *mut git_pathspec
);
3404 pub fn git_pathspec_match_diff(
3405 out
: *mut *mut git_pathspec_match_list
,
3406 diff
: *mut git_diff
,
3408 ps
: *mut git_pathspec
,
3410 pub fn git_pathspec_match_index(
3411 out
: *mut *mut git_pathspec_match_list
,
3412 index
: *mut git_index
,
3414 ps
: *mut git_pathspec
,
3416 pub fn git_pathspec_match_list_diff_entry(
3417 m
: *const git_pathspec_match_list
,
3419 ) -> *const git_diff_delta
;
3420 pub fn git_pathspec_match_list_entry(
3421 m
: *const git_pathspec_match_list
,
3424 pub fn git_pathspec_match_list_entrycount(m
: *const git_pathspec_match_list
) -> size_t
;
3425 pub fn git_pathspec_match_list_failed_entry(
3426 m
: *const git_pathspec_match_list
,
3429 pub fn git_pathspec_match_list_failed_entrycount(m
: *const git_pathspec_match_list
) -> size_t
;
3430 pub fn git_pathspec_match_list_free(m
: *mut git_pathspec_match_list
);
3431 pub fn git_pathspec_match_tree(
3432 out
: *mut *mut git_pathspec_match_list
,
3433 tree
: *mut git_tree
,
3435 ps
: *mut git_pathspec
,
3437 pub fn git_pathspec_match_workdir(
3438 out
: *mut *mut git_pathspec_match_list
,
3439 repo
: *mut git_repository
,
3441 ps
: *mut git_pathspec
,
3443 pub fn git_pathspec_matches_path(
3444 ps
: *const git_pathspec
,
3446 path
: *const c_char
,
3448 pub fn git_pathspec_new(out
: *mut *mut git_pathspec
, pathspec
: *const git_strarray
) -> c_int
;
3451 pub fn git_diff_blob_to_buffer(
3452 old_blob
: *const git_blob
,
3453 old_as_path
: *const c_char
,
3454 buffer
: *const c_char
,
3456 buffer_as_path
: *const c_char
,
3457 options
: *const git_diff_options
,
3458 file_cb
: git_diff_file_cb
,
3459 binary_cb
: git_diff_binary_cb
,
3460 hunk_cb
: git_diff_hunk_cb
,
3461 line_cb
: git_diff_line_cb
,
3462 payload
: *mut c_void
,
3464 pub fn git_diff_blobs(
3465 old_blob
: *const git_blob
,
3466 old_as_path
: *const c_char
,
3467 new_blob
: *const git_blob
,
3468 new_as_path
: *const c_char
,
3469 options
: *const git_diff_options
,
3470 file_cb
: git_diff_file_cb
,
3471 binary_cb
: git_diff_binary_cb
,
3472 hunk_cb
: git_diff_hunk_cb
,
3473 line_cb
: git_diff_line_cb
,
3474 payload
: *mut c_void
,
3476 pub fn git_diff_buffers(
3477 old_buffer
: *const c_void
,
3479 old_as_path
: *const c_char
,
3480 new_buffer
: *const c_void
,
3482 new_as_path
: *const c_char
,
3483 options
: *const git_diff_options
,
3484 file_cb
: git_diff_file_cb
,
3485 binary_cb
: git_diff_binary_cb
,
3486 hunk_cb
: git_diff_hunk_cb
,
3487 line_cb
: git_diff_line_cb
,
3488 payload
: *mut c_void
,
3490 pub fn git_diff_from_buffer(
3491 diff
: *mut *mut git_diff
,
3492 content
: *const c_char
,
3493 content_len
: size_t
,
3495 pub fn git_diff_find_similar(
3496 diff
: *mut git_diff
,
3497 options
: *const git_diff_find_options
,
3499 pub fn git_diff_find_init_options(opts
: *mut git_diff_find_options
, version
: c_uint
) -> c_int
;
3500 pub fn git_diff_foreach(
3501 diff
: *mut git_diff
,
3502 file_cb
: git_diff_file_cb
,
3503 binary_cb
: git_diff_binary_cb
,
3504 hunk_cb
: git_diff_hunk_cb
,
3505 line_cb
: git_diff_line_cb
,
3506 payload
: *mut c_void
,
3508 pub fn git_diff_free(diff
: *mut git_diff
);
3509 pub fn git_diff_get_delta(diff
: *const git_diff
, idx
: size_t
) -> *const git_diff_delta
;
3510 pub fn git_diff_get_stats(out
: *mut *mut git_diff_stats
, diff
: *mut git_diff
) -> c_int
;
3511 pub fn git_diff_index_to_index(
3512 diff
: *mut *mut git_diff
,
3513 repo
: *mut git_repository
,
3514 old_index
: *mut git_index
,
3515 new_index
: *mut git_index
,
3516 opts
: *const git_diff_options
,
3518 pub fn git_diff_index_to_workdir(
3519 diff
: *mut *mut git_diff
,
3520 repo
: *mut git_repository
,
3521 index
: *mut git_index
,
3522 opts
: *const git_diff_options
,
3524 pub fn git_diff_init_options(opts
: *mut git_diff_options
, version
: c_uint
) -> c_int
;
3525 pub fn git_diff_is_sorted_icase(diff
: *const git_diff
) -> c_int
;
3526 pub fn git_diff_merge(onto
: *mut git_diff
, from
: *const git_diff
) -> c_int
;
3527 pub fn git_diff_num_deltas(diff
: *const git_diff
) -> size_t
;
3528 pub fn git_diff_num_deltas_of_type(diff
: *const git_diff
, delta
: git_delta_t
) -> size_t
;
3529 pub fn git_diff_print(
3530 diff
: *mut git_diff
,
3531 format
: git_diff_format_t
,
3532 print_cb
: git_diff_line_cb
,
3533 payload
: *mut c_void
,
3535 pub fn git_diff_stats_deletions(stats
: *const git_diff_stats
) -> size_t
;
3536 pub fn git_diff_stats_files_changed(stats
: *const git_diff_stats
) -> size_t
;
3537 pub fn git_diff_stats_free(stats
: *mut git_diff_stats
);
3538 pub fn git_diff_stats_insertions(stats
: *const git_diff_stats
) -> size_t
;
3539 pub fn git_diff_stats_to_buf(
3541 stats
: *const git_diff_stats
,
3542 format
: git_diff_stats_format_t
,
3545 pub fn git_diff_status_char(status
: git_delta_t
) -> c_char
;
3546 pub fn git_diff_tree_to_index(
3547 diff
: *mut *mut git_diff
,
3548 repo
: *mut git_repository
,
3549 old_tree
: *mut git_tree
,
3550 index
: *mut git_index
,
3551 opts
: *const git_diff_options
,
3553 pub fn git_diff_tree_to_tree(
3554 diff
: *mut *mut git_diff
,
3555 repo
: *mut git_repository
,
3556 old_tree
: *mut git_tree
,
3557 new_tree
: *mut git_tree
,
3558 opts
: *const git_diff_options
,
3560 pub fn git_diff_tree_to_workdir(
3561 diff
: *mut *mut git_diff
,
3562 repo
: *mut git_repository
,
3563 old_tree
: *mut git_tree
,
3564 opts
: *const git_diff_options
,
3566 pub fn git_diff_tree_to_workdir_with_index(
3567 diff
: *mut *mut git_diff
,
3568 repo
: *mut git_repository
,
3569 old_tree
: *mut git_tree
,
3570 opts
: *const git_diff_options
,
3573 pub fn git_graph_ahead_behind(
3575 behind
: *mut size_t
,
3576 repo
: *mut git_repository
,
3577 local
: *const git_oid
,
3578 upstream
: *const git_oid
,
3581 pub fn git_graph_descendant_of(
3582 repo
: *mut git_repository
,
3583 commit
: *const git_oid
,
3584 ancestor
: *const git_oid
,
3587 pub fn git_diff_format_email(
3589 diff
: *mut git_diff
,
3590 opts
: *const git_diff_format_email_options
,
3592 pub fn git_diff_format_email_options_init(
3593 opts
: *mut git_diff_format_email_options
,
3597 pub fn git_diff_patchid(
3599 diff
: *mut git_diff
,
3600 opts
: *mut git_diff_patchid_options
,
3602 pub fn git_diff_patchid_options_init(
3603 opts
: *mut git_diff_patchid_options
,
3608 pub fn git_patch_from_diff(out
: *mut *mut git_patch
, diff
: *mut git_diff
, idx
: size_t
)
3610 pub fn git_patch_from_blobs(
3611 out
: *mut *mut git_patch
,
3612 old_blob
: *const git_blob
,
3613 old_as_path
: *const c_char
,
3614 new_blob
: *const git_blob
,
3615 new_as_path
: *const c_char
,
3616 opts
: *const git_diff_options
,
3618 pub fn git_patch_from_blob_and_buffer(
3619 out
: *mut *mut git_patch
,
3620 old_blob
: *const git_blob
,
3621 old_as_path
: *const c_char
,
3622 buffer
: *const c_void
,
3624 buffer_as_path
: *const c_char
,
3625 opts
: *const git_diff_options
,
3627 pub fn git_patch_from_buffers(
3628 out
: *mut *mut git_patch
,
3629 old_buffer
: *const c_void
,
3631 old_as_path
: *const c_char
,
3632 new_buffer
: *const c_void
,
3634 new_as_path
: *const c_char
,
3635 opts
: *const git_diff_options
,
3637 pub fn git_patch_free(patch
: *mut git_patch
);
3638 pub fn git_patch_get_delta(patch
: *const git_patch
) -> *const git_diff_delta
;
3639 pub fn git_patch_num_hunks(patch
: *const git_patch
) -> size_t
;
3640 pub fn git_patch_line_stats(
3641 total_context
: *mut size_t
,
3642 total_additions
: *mut size_t
,
3643 total_deletions
: *mut size_t
,
3644 patch
: *const git_patch
,
3646 pub fn git_patch_get_hunk(
3647 out
: *mut *const git_diff_hunk
,
3648 lines_in_hunk
: *mut size_t
,
3649 patch
: *mut git_patch
,
3652 pub fn git_patch_num_lines_in_hunk(patch
: *const git_patch
, hunk_idx
: size_t
) -> c_int
;
3653 pub fn git_patch_get_line_in_hunk(
3654 out
: *mut *const git_diff_line
,
3655 patch
: *mut git_patch
,
3657 line_of_hunk
: size_t
,
3659 pub fn git_patch_size(
3660 patch
: *mut git_patch
,
3661 include_context
: c_int
,
3662 include_hunk_headers
: c_int
,
3663 include_file_headers
: c_int
,
3665 pub fn git_patch_print(
3666 patch
: *mut git_patch
,
3667 print_cb
: git_diff_line_cb
,
3668 payload
: *mut c_void
,
3670 pub fn git_patch_to_buf(buf
: *mut git_buf
, patch
: *mut git_patch
) -> c_int
;
3673 pub fn git_reflog_append(
3674 reflog
: *mut git_reflog
,
3676 committer
: *const git_signature
,
3679 pub fn git_reflog_delete(repo
: *mut git_repository
, name
: *const c_char
) -> c_int
;
3680 pub fn git_reflog_drop(
3681 reflog
: *mut git_reflog
,
3683 rewrite_previous_entry
: c_int
,
3685 pub fn git_reflog_entry_byindex(
3686 reflog
: *const git_reflog
,
3688 ) -> *const git_reflog_entry
;
3689 pub fn git_reflog_entry_committer(entry
: *const git_reflog_entry
) -> *const git_signature
;
3690 pub fn git_reflog_entry_id_new(entry
: *const git_reflog_entry
) -> *const git_oid
;
3691 pub fn git_reflog_entry_id_old(entry
: *const git_reflog_entry
) -> *const git_oid
;
3692 pub fn git_reflog_entry_message(entry
: *const git_reflog_entry
) -> *const c_char
;
3693 pub fn git_reflog_entrycount(reflog
: *mut git_reflog
) -> size_t
;
3694 pub fn git_reflog_free(reflog
: *mut git_reflog
);
3695 pub fn git_reflog_read(
3696 out
: *mut *mut git_reflog
,
3697 repo
: *mut git_repository
,
3698 name
: *const c_char
,
3700 pub fn git_reflog_rename(
3701 repo
: *mut git_repository
,
3702 old_name
: *const c_char
,
3703 name
: *const c_char
,
3705 pub fn git_reflog_write(reflog
: *mut git_reflog
) -> c_int
;
3708 pub fn git_transport_register(
3709 prefix
: *const c_char
,
3710 cb
: git_transport_cb
,
3713 pub fn git_transport_unregister(prefix
: *const c_char
) -> c_int
;
3714 pub fn git_transport_smart(
3715 out
: *mut *mut git_transport
,
3716 owner
: *mut git_remote
,
3717 payload
: *mut c_void
,
3721 pub fn git_describe_commit(
3722 result
: *mut *mut git_describe_result
,
3723 object
: *mut git_object
,
3724 opts
: *mut git_describe_options
,
3726 pub fn git_describe_format(
3728 result
: *const git_describe_result
,
3729 opts
: *const git_describe_format_options
,
3731 pub fn git_describe_result_free(result
: *mut git_describe_result
);
3732 pub fn git_describe_workdir(
3733 out
: *mut *mut git_describe_result
,
3734 repo
: *mut git_repository
,
3735 opts
: *mut git_describe_options
,
3739 pub fn git_message_prettify(
3741 message
: *const c_char
,
3742 strip_comments
: c_int
,
3743 comment_char
: c_char
,
3746 pub fn git_message_trailers(
3747 out
: *mut git_message_trailer_array
,
3748 message
: *const c_char
,
3751 pub fn git_message_trailer_array_free(trailer
: *mut git_message_trailer_array
);
3754 pub fn git_packbuilder_new(out
: *mut *mut git_packbuilder
, repo
: *mut git_repository
) -> c_int
;
3755 pub fn git_packbuilder_set_threads(pb
: *mut git_packbuilder
, n
: c_uint
) -> c_uint
;
3756 pub fn git_packbuilder_insert(
3757 pb
: *mut git_packbuilder
,
3759 name
: *const c_char
,
3761 pub fn git_packbuilder_insert_tree(pb
: *mut git_packbuilder
, id
: *const git_oid
) -> c_int
;
3762 pub fn git_packbuilder_insert_commit(pb
: *mut git_packbuilder
, id
: *const git_oid
) -> c_int
;
3763 pub fn git_packbuilder_insert_walk(pb
: *mut git_packbuilder
, walk
: *mut git_revwalk
) -> c_int
;
3764 pub fn git_packbuilder_insert_recur(
3765 pb
: *mut git_packbuilder
,
3767 name
: *const c_char
,
3769 pub fn git_packbuilder_write_buf(buf
: *mut git_buf
, pb
: *mut git_packbuilder
) -> c_int
;
3770 pub fn git_packbuilder_write(
3771 pb
: *mut git_packbuilder
,
3772 path
: *const c_char
,
3774 progress_cb
: git_indexer_progress_cb
,
3775 progress_cb_payload
: *mut c_void
,
3777 #[deprecated = "use `git_packbuilder_name` to retrieve the filename"]
3778 pub fn git_packbuilder_hash(pb
: *mut git_packbuilder
) -> *const git_oid
;
3779 pub fn git_packbuilder_name(pb
: *mut git_packbuilder
) -> *const c_char
;
3780 pub fn git_packbuilder_foreach(
3781 pb
: *mut git_packbuilder
,
3782 cb
: git_packbuilder_foreach_cb
,
3783 payload
: *mut c_void
,
3785 pub fn git_packbuilder_object_count(pb
: *mut git_packbuilder
) -> size_t
;
3786 pub fn git_packbuilder_written(pb
: *mut git_packbuilder
) -> size_t
;
3787 pub fn git_packbuilder_set_callbacks(
3788 pb
: *mut git_packbuilder
,
3789 progress_cb
: git_packbuilder_progress
,
3790 progress_cb_payload
: *mut c_void
,
3792 pub fn git_packbuilder_free(pb
: *mut git_packbuilder
);
3795 pub fn git_repository_odb(out
: *mut *mut git_odb
, repo
: *mut git_repository
) -> c_int
;
3796 pub fn git_odb_new(db
: *mut *mut git_odb
) -> c_int
;
3797 pub fn git_odb_free(db
: *mut git_odb
);
3798 pub fn git_odb_open_rstream(
3799 out
: *mut *mut git_odb_stream
,
3801 otype
: *mut git_object_t
,
3803 oid
: *const git_oid
,
3805 pub fn git_odb_stream_read(
3806 stream
: *mut git_odb_stream
,
3807 buffer
: *mut c_char
,
3810 pub fn git_odb_open_wstream(
3811 out
: *mut *mut git_odb_stream
,
3813 size
: git_object_size_t
,
3814 obj_type
: git_object_t
,
3816 pub fn git_odb_stream_write(
3817 stream
: *mut git_odb_stream
,
3818 buffer
: *const c_char
,
3821 pub fn git_odb_stream_finalize_write(id
: *mut git_oid
, stream
: *mut git_odb_stream
) -> c_int
;
3822 pub fn git_odb_stream_free(stream
: *mut git_odb_stream
);
3823 pub fn git_odb_foreach(db
: *mut git_odb
, cb
: git_odb_foreach_cb
, payload
: *mut c_void
)
3826 pub fn git_odb_read(
3827 out
: *mut *mut git_odb_object
,
3829 oid
: *const git_oid
,
3832 pub fn git_odb_read_header(
3833 len_out
: *mut size_t
,
3834 type_out
: *mut git_object_t
,
3836 oid
: *const git_oid
,
3839 pub fn git_odb_write(
3842 data
: *const c_void
,
3844 otype
: git_object_t
,
3847 pub fn git_odb_write_pack(
3848 out
: *mut *mut git_odb_writepack
,
3850 progress_cb
: git_indexer_progress_cb
,
3851 progress_payload
: *mut c_void
,
3854 pub fn git_odb_hash(
3856 data
: *const c_void
,
3858 otype
: git_object_t
,
3861 pub fn git_odb_hashfile(out
: *mut git_oid
, path
: *const c_char
, otype
: git_object_t
) -> c_int
;
3863 pub fn git_odb_exists_prefix(
3866 short_oid
: *const git_oid
,
3870 pub fn git_odb_exists(odb
: *mut git_odb
, oid
: *const git_oid
) -> c_int
;
3871 pub fn git_odb_exists_ext(odb
: *mut git_odb
, oid
: *const git_oid
, flags
: c_uint
) -> c_int
;
3873 pub fn git_odb_refresh(odb
: *mut git_odb
) -> c_int
;
3875 pub fn git_odb_object_id(obj
: *mut git_odb_object
) -> *const git_oid
;
3876 pub fn git_odb_object_size(obj
: *mut git_odb_object
) -> size_t
;
3877 pub fn git_odb_object_type(obj
: *mut git_odb_object
) -> git_object_t
;
3878 pub fn git_odb_object_data(obj
: *mut git_odb_object
) -> *const c_void
;
3879 pub fn git_odb_object_dup(out
: *mut *mut git_odb_object
, obj
: *mut git_odb_object
) -> c_int
;
3880 pub fn git_odb_object_free(obj
: *mut git_odb_object
);
3882 pub fn git_odb_init_backend(odb
: *mut git_odb_backend
, version
: c_uint
) -> c_int
;
3884 pub fn git_odb_add_backend(
3886 backend
: *mut git_odb_backend
,
3890 pub fn git_odb_backend_pack(
3891 out
: *mut *mut git_odb_backend
,
3892 objects_dir
: *const c_char
,
3895 pub fn git_odb_backend_one_pack(
3896 out
: *mut *mut git_odb_backend
,
3897 objects_dir
: *const c_char
,
3900 pub fn git_odb_add_disk_alternate(odb
: *mut git_odb
, path
: *const c_char
) -> c_int
;
3902 pub fn git_odb_backend_loose(
3903 out
: *mut *mut git_odb_backend
,
3904 objects_dir
: *const c_char
,
3905 compression_level
: c_int
,
3911 pub fn git_odb_add_alternate(
3913 backend
: *mut git_odb_backend
,
3917 pub fn git_odb_backend_malloc(backend
: *mut git_odb_backend
, len
: size_t
) -> *mut c_void
;
3919 pub fn git_odb_num_backends(odb
: *mut git_odb
) -> size_t
;
3920 pub fn git_odb_get_backend(
3921 backend
: *mut *mut git_odb_backend
,
3927 pub fn git_mempack_new(out
: *mut *mut git_odb_backend
) -> c_int
;
3928 pub fn git_mempack_reset(backend
: *mut git_odb_backend
) -> c_int
;
3929 pub fn git_mempack_dump(
3931 repo
: *mut git_repository
,
3932 backend
: *mut git_odb_backend
,
3936 pub fn git_refdb_new(out
: *mut *mut git_refdb
, repo
: *mut git_repository
) -> c_int
;
3937 pub fn git_refdb_open(out
: *mut *mut git_refdb
, repo
: *mut git_repository
) -> c_int
;
3938 pub fn git_refdb_backend_fs(
3939 out
: *mut *mut git_refdb_backend
,
3940 repo
: *mut git_repository
,
3942 pub fn git_refdb_init_backend(backend
: *mut git_refdb_backend
, version
: c_uint
) -> c_int
;
3943 pub fn git_refdb_set_backend(refdb
: *mut git_refdb
, backend
: *mut git_refdb_backend
) -> c_int
;
3944 pub fn git_refdb_compress(refdb
: *mut git_refdb
) -> c_int
;
3945 pub fn git_refdb_free(refdb
: *mut git_refdb
);
3948 pub fn git_rebase_init_options(opts
: *mut git_rebase_options
, version
: c_uint
) -> c_int
;
3949 pub fn git_rebase_init(
3950 out
: *mut *mut git_rebase
,
3951 repo
: *mut git_repository
,
3952 branch
: *const git_annotated_commit
,
3953 upstream
: *const git_annotated_commit
,
3954 onto
: *const git_annotated_commit
,
3955 opts
: *const git_rebase_options
,
3957 pub fn git_rebase_open(
3958 out
: *mut *mut git_rebase
,
3959 repo
: *mut git_repository
,
3960 opts
: *const git_rebase_options
,
3962 pub fn git_rebase_operation_entrycount(rebase
: *mut git_rebase
) -> size_t
;
3963 pub fn git_rebase_operation_current(rebase
: *mut git_rebase
) -> size_t
;
3964 pub fn git_rebase_operation_byindex(
3965 rebase
: *mut git_rebase
,
3967 ) -> *mut git_rebase_operation
;
3968 pub fn git_rebase_orig_head_id(rebase
: *mut git_rebase
) -> *const git_oid
;
3969 pub fn git_rebase_orig_head_name(rebase
: *mut git_rebase
) -> *const c_char
;
3970 pub fn git_rebase_next(
3971 operation
: *mut *mut git_rebase_operation
,
3972 rebase
: *mut git_rebase
,
3974 pub fn git_rebase_inmemory_index(index
: *mut *mut git_index
, rebase
: *mut git_rebase
) -> c_int
;
3975 pub fn git_rebase_commit(
3977 rebase
: *mut git_rebase
,
3978 author
: *const git_signature
,
3979 committer
: *const git_signature
,
3980 message_encoding
: *const c_char
,
3981 message
: *const c_char
,
3983 pub fn git_rebase_abort(rebase
: *mut git_rebase
) -> c_int
;
3984 pub fn git_rebase_finish(rebase
: *mut git_rebase
, signature
: *const git_signature
) -> c_int
;
3985 pub fn git_rebase_free(rebase
: *mut git_rebase
);
3988 pub fn git_cherrypick_init_options(opts
: *mut git_cherrypick_options
, version
: c_uint
)
3990 pub fn git_cherrypick(
3991 repo
: *mut git_repository
,
3992 commit
: *mut git_commit
,
3993 options
: *const git_cherrypick_options
,
3995 pub fn git_cherrypick_commit(
3996 out
: *mut *mut git_index
,
3997 repo
: *mut git_repository
,
3998 cherrypick_commit
: *mut git_commit
,
3999 our_commit
: *mut git_commit
,
4001 merge_options
: *const git_merge_options
,
4005 pub fn git_apply_options_init(opts
: *mut git_apply_options
, version
: c_uint
) -> c_int
;
4006 pub fn git_apply_to_tree(
4007 out
: *mut *mut git_index
,
4008 repo
: *mut git_repository
,
4009 preimage
: *mut git_tree
,
4010 diff
: *mut git_diff
,
4011 options
: *const git_apply_options
,
4014 repo
: *mut git_repository
,
4015 diff
: *mut git_diff
,
4016 location
: git_apply_location_t
,
4017 options
: *const git_apply_options
,
4021 pub fn git_revert_options_init(opts
: *mut git_revert_options
, version
: c_uint
) -> c_int
;
4022 pub fn git_revert_commit(
4023 out
: *mut *mut git_index
,
4024 repo
: *mut git_repository
,
4025 revert_commit
: *mut git_commit
,
4026 our_commit
: *mut git_commit
,
4028 merge_options
: *const git_merge_options
,
4031 repo
: *mut git_repository
,
4032 commit
: *mut git_commit
,
4033 given_opts
: *const git_revert_options
,
4037 pub fn git_libgit2_version(major
: *mut c_int
, minor
: *mut c_int
, rev
: *mut c_int
) -> c_int
;
4038 pub fn git_libgit2_features() -> c_int
;
4039 pub fn git_libgit2_opts(option
: c_int
, ...) -> c_int
;
4042 pub fn git_worktree_list(out
: *mut git_strarray
, repo
: *mut git_repository
) -> c_int
;
4043 pub fn git_worktree_lookup(
4044 out
: *mut *mut git_worktree
,
4045 repo
: *mut git_repository
,
4046 name
: *const c_char
,
4048 pub fn git_worktree_open_from_repository(
4049 out
: *mut *mut git_worktree
,
4050 repo
: *mut git_repository
,
4052 pub fn git_worktree_free(wt
: *mut git_worktree
);
4053 pub fn git_worktree_validate(wt
: *const git_worktree
) -> c_int
;
4054 pub fn git_worktree_add_options_init(
4055 opts
: *mut git_worktree_add_options
,
4058 pub fn git_worktree_add(
4059 out
: *mut *mut git_worktree
,
4060 repo
: *mut git_repository
,
4061 name
: *const c_char
,
4062 path
: *const c_char
,
4063 opts
: *const git_worktree_add_options
,
4065 pub fn git_worktree_lock(wt
: *mut git_worktree
, reason
: *const c_char
) -> c_int
;
4066 pub fn git_worktree_unlock(wt
: *mut git_worktree
) -> c_int
;
4067 pub fn git_worktree_is_locked(reason
: *mut git_buf
, wt
: *const git_worktree
) -> c_int
;
4068 pub fn git_worktree_name(wt
: *const git_worktree
) -> *const c_char
;
4069 pub fn git_worktree_path(wt
: *const git_worktree
) -> *const c_char
;
4070 pub fn git_worktree_prune_options_init(
4071 opts
: *mut git_worktree_prune_options
,
4074 pub fn git_worktree_is_prunable(
4075 wt
: *mut git_worktree
,
4076 opts
: *mut git_worktree_prune_options
,
4078 pub fn git_worktree_prune(
4079 wt
: *mut git_worktree
,
4080 opts
: *mut git_worktree_prune_options
,
4084 pub fn git_transaction_new(out
: *mut *mut git_transaction
, repo
: *mut git_repository
) -> c_int
;
4085 pub fn git_transaction_lock_ref(tx
: *mut git_transaction
, refname
: *const c_char
) -> c_int
;
4086 pub fn git_transaction_set_target(
4087 tx
: *mut git_transaction
,
4088 refname
: *const c_char
,
4089 target
: *const git_oid
,
4090 sig
: *const git_signature
,
4093 pub fn git_transaction_set_symbolic_target(
4094 tx
: *mut git_transaction
,
4095 refname
: *const c_char
,
4096 target
: *const c_char
,
4097 sig
: *const git_signature
,
4100 pub fn git_transaction_set_reflog(
4101 tx
: *mut git_transaction
,
4102 refname
: *const c_char
,
4103 reflog
: *const git_reflog
,
4105 pub fn git_transaction_remove(tx
: *mut git_transaction
, refname
: *const c_char
) -> c_int
;
4106 pub fn git_transaction_commit(tx
: *mut git_transaction
) -> c_int
;
4107 pub fn git_transaction_free(tx
: *mut git_transaction
);
4110 pub fn git_mailmap_new(out
: *mut *mut git_mailmap
) -> c_int
;
4111 pub fn git_mailmap_from_buffer(
4112 out
: *mut *mut git_mailmap
,
4116 pub fn git_mailmap_from_repository(
4117 out
: *mut *mut git_mailmap
,
4118 repo
: *mut git_repository
,
4120 pub fn git_mailmap_free(mm
: *mut git_mailmap
);
4121 pub fn git_mailmap_resolve_signature(
4122 out
: *mut *mut git_signature
,
4123 mm
: *const git_mailmap
,
4124 sig
: *const git_signature
,
4126 pub fn git_mailmap_add_entry(
4127 mm
: *mut git_mailmap
,
4128 real_name
: *const c_char
,
4129 real_email
: *const c_char
,
4130 replace_name
: *const c_char
,
4131 replace_email
: *const c_char
,
4135 pub fn git_email_create_from_diff(
4137 diff
: *mut git_diff
,
4140 commit_id
: *const git_oid
,
4141 summary
: *const c_char
,
4142 body
: *const c_char
,
4143 author
: *const git_signature
,
4144 given_opts
: *const git_email_create_options
,
4147 pub fn git_email_create_from_commit(
4149 commit
: *mut git_commit
,
4150 given_opts
: *const git_email_create_options
,
4153 pub fn git_trace_set(level
: git_trace_level_t
, cb
: git_trace_cb
) -> c_int
;
4157 use std
::sync
::Once
;
4159 static INIT
: Once
= Once
::new();
4160 INIT
.call_once(|| unsafe {
4163 let rc
= git_libgit2_init();
4165 // Note that we intentionally never schedule `git_libgit2_shutdown`
4166 // to get called. There's not really a great time to call that and
4167 // #276 has some more info about how automatically doing it can
4172 let git_error
= git_error_last();
4173 let error
= if !git_error
.is_null() {
4174 CStr
::from_ptr((*git_error
).message
).to_string_lossy()
4176 "unknown error".into()
4179 "couldn't initialize the libgit2 library: {}, error: {}",
4185 #[cfg(all(unix, feature = "https"))]
4187 pub fn openssl_init() {
4188 openssl_sys
::init();
4191 #[cfg(any(windows, not(feature = "https")))]
4193 pub fn openssl_init() {}
4195 #[cfg(feature = "ssh")]
4200 #[cfg(not(feature = "ssh"))]
4204 pub fn vendored() -> bool
{
4205 cfg
!(libgit2_vendored
)