summaryrefslogtreecommitdiffstats
path: root/vendor/libgit2-sys/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/libgit2-sys/lib.rs')
-rw-r--r--vendor/libgit2-sys/lib.rs32
1 files changed, 29 insertions, 3 deletions
diff --git a/vendor/libgit2-sys/lib.rs b/vendor/libgit2-sys/lib.rs
index 3dd11978b..6c42d70d2 100644
--- a/vendor/libgit2-sys/lib.rs
+++ b/vendor/libgit2-sys/lib.rs
@@ -1,4 +1,4 @@
-#![doc(html_root_url = "https://docs.rs/libgit2-sys/0.15")]
+#![doc(html_root_url = "https://docs.rs/libgit2-sys/0.16")]
#![allow(non_camel_case_types, unused_extern_crates)]
// This is required to link libz when libssh2-sys is not included.
@@ -394,10 +394,20 @@ pub struct git_fetch_options {
pub update_fetchhead: c_int,
pub download_tags: git_remote_autotag_option_t,
pub proxy_opts: git_proxy_options,
+ pub depth: c_int,
pub follow_redirects: git_remote_redirect_t,
pub custom_headers: git_strarray,
}
+#[repr(C)]
+pub struct git_fetch_negotiation {
+ refs: *const *const git_remote_head,
+ refs_len: size_t,
+ shallow_roots: *mut git_oid,
+ shallow_roots_len: size_t,
+ depth: c_int,
+}
+
git_enum! {
pub enum git_remote_autotag_option_t {
GIT_REMOTE_DOWNLOAD_TAGS_UNSPECIFIED,
@@ -1137,6 +1147,7 @@ pub struct git_diff_options {
pub payload: *mut c_void,
pub context_lines: u32,
pub interhunk_lines: u32,
+ pub oid_type: git_oid_t,
pub id_abbrev: u16,
pub max_size: git_off_t,
pub old_prefix: *const c_char,
@@ -1144,6 +1155,14 @@ pub struct git_diff_options {
}
git_enum! {
+ pub enum git_oid_t {
+ GIT_OID_SHA1 = 1,
+ // SHA256 is still experimental so we are not going to enable it.
+ /* GIT_OID_SHA256 = 2, */
+ }
+}
+
+git_enum! {
pub enum git_diff_format_t {
GIT_DIFF_FORMAT_PATCH = 1,
GIT_DIFF_FORMAT_PATCH_HEADER = 2,
@@ -1406,10 +1425,11 @@ pub struct git_transport {
extern "C" fn(
transport: *mut git_transport,
repo: *mut git_repository,
- refs: *const *const git_remote_head,
- count: size_t,
+ fetch_data: *const git_fetch_negotiation,
) -> c_int,
>,
+ pub shallow_roots:
+ Option<extern "C" fn(out: *mut git_oidarray, transport: *mut git_transport) -> c_int>,
pub download_pack: Option<
extern "C" fn(
transport: *mut git_transport,
@@ -3386,6 +3406,12 @@ extern "C" {
) -> c_int;
// blame
+ pub fn git_blame_buffer(
+ out: *mut *mut git_blame,
+ reference: *mut git_blame,
+ buffer: *const c_char,
+ buffer_len: size_t,
+ ) -> c_int;
pub fn git_blame_file(
out: *mut *mut git_blame,
repo: *mut git_repository,