Skip to content

Commit 72ca0b1

Browse files
committed
git_oid_t enum to differentiate sha1/sha256 support
1 parent 6172d45 commit 72ca0b1

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Diff for: libgit2-sys/lib.rs

+9
Original file line numberDiff line numberDiff line change
@@ -1147,12 +1147,21 @@ pub struct git_diff_options {
11471147
pub payload: *mut c_void,
11481148
pub context_lines: u32,
11491149
pub interhunk_lines: u32,
1150+
pub oid_type: git_oid_t,
11501151
pub id_abbrev: u16,
11511152
pub max_size: git_off_t,
11521153
pub old_prefix: *const c_char,
11531154
pub new_prefix: *const c_char,
11541155
}
11551156

1157+
git_enum! {
1158+
pub enum git_oid_t {
1159+
GIT_OID_SHA1 = 1,
1160+
// SHA256 is still experimental so we are not going to enable it.
1161+
/* GIT_OID_SHA256 = 2, */
1162+
}
1163+
}
1164+
11561165
git_enum! {
11571166
pub enum git_diff_format_t {
11581167
GIT_DIFF_FORMAT_PATCH = 1,

0 commit comments

Comments
 (0)