Skip to content

Commit

Permalink
git_oid_t enum to differentiate sha1/sha256 support
Browse files Browse the repository at this point in the history
  • Loading branch information
weihanglo committed Jul 21, 2023
1 parent 15bbb90 commit c30fe2d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions libgit2-sys/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1147,12 +1147,21 @@ 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,
pub new_prefix: *const c_char,
}

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,
Expand Down

0 comments on commit c30fe2d

Please sign in to comment.