Skip to content

Commit 0d1e96f

Browse files
committed
feat: Add struct git_reference_iterator
Added struct `git_reference_iterator`. See git2/sys/refdb_backend.h line 35.
1 parent 39509e7 commit 0d1e96f

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

libgit2-sys/lib.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ pub const GIT_CONFIG_BACKEND_VERSION: c_uint = 1;
112112
pub struct git_config_backend_memory_options {
113113
pub version: c_uint,
114114
pub backend_type: *const c_char,
115-
pub origin_path: *const c_char
115+
pub origin_path: *const c_char,
116116
}
117117

118118
pub const GIT_CONFIG_BACKEND_MEMORY_OPTIONS_VERSION: c_uint = 1;
@@ -121,7 +121,15 @@ pub enum git_index {}
121121
pub enum git_index_conflict_iterator {}
122122
pub enum git_object {}
123123
pub enum git_reference {}
124-
pub enum git_reference_iterator {}
124+
125+
#[repr(C)]
126+
pub struct git_reference_iterator {
127+
pub db: *mut git_refdb,
128+
pub next: Option<fn(*mut *mut git_reference, *mut git_reference_iterator) -> c_int>,
129+
pub next_name: Option<fn(*mut *const c_char, *mut git_reference_iterator) -> c_int>,
130+
pub free: Option<fn(*mut git_reference_iterator)>,
131+
}
132+
125133
pub enum git_annotated_commit {}
126134
pub enum git_refdb {}
127135
pub enum git_refspec {}

0 commit comments

Comments
 (0)