@@ -1133,7 +1133,7 @@ impl Repository {
11331133 /// the blob.
11341134 pub fn blob ( & self , data : & [ u8 ] ) -> Result < Oid , Error > {
11351135 let mut raw = raw:: git_oid {
1136- id : [ 0 ; raw:: GIT_OID_RAWSZ ] ,
1136+ id : [ 0 ; raw:: GIT_OID_MAX_SIZE ] ,
11371137 } ;
11381138 unsafe {
11391139 let ptr = data. as_ptr ( ) as * const c_void ;
@@ -1157,7 +1157,7 @@ impl Repository {
11571157 // Normal file path OK (does not need Windows conversion).
11581158 let path = path. into_c_string ( ) ?;
11591159 let mut raw = raw:: git_oid {
1160- id : [ 0 ; raw:: GIT_OID_RAWSZ ] ,
1160+ id : [ 0 ; raw:: GIT_OID_MAX_SIZE ] ,
11611161 } ;
11621162 unsafe {
11631163 try_call ! ( raw:: git_blob_create_fromdisk( & mut raw, self . raw( ) , path) ) ;
@@ -1310,7 +1310,7 @@ impl Repository {
13101310 . collect :: < Vec < _ > > ( ) ;
13111311 let message = CString :: new ( message) ?;
13121312 let mut raw = raw:: git_oid {
1313- id : [ 0 ; raw:: GIT_OID_RAWSZ ] ,
1313+ id : [ 0 ; raw:: GIT_OID_MAX_SIZE ] ,
13141314 } ;
13151315 unsafe {
13161316 try_call ! ( raw:: git_commit_create(
@@ -1384,7 +1384,7 @@ impl Repository {
13841384 let signature = CString :: new ( signature) ?;
13851385 let signature_field = crate :: opt_cstr ( signature_field) ?;
13861386 let mut raw = raw:: git_oid {
1387- id : [ 0 ; raw:: GIT_OID_RAWSZ ] ,
1387+ id : [ 0 ; raw:: GIT_OID_MAX_SIZE ] ,
13881388 } ;
13891389 unsafe {
13901390 try_call ! ( raw:: git_commit_create_with_signature(
@@ -1683,7 +1683,7 @@ impl Repository {
16831683 pub fn refname_to_id ( & self , name : & str ) -> Result < Oid , Error > {
16841684 let name = CString :: new ( name) ?;
16851685 let mut ret = raw:: git_oid {
1686- id : [ 0 ; raw:: GIT_OID_RAWSZ ] ,
1686+ id : [ 0 ; raw:: GIT_OID_MAX_SIZE ] ,
16871687 } ;
16881688 unsafe {
16891689 try_call ! ( raw:: git_reference_name_to_id( & mut ret, self . raw( ) , name) ) ;
@@ -1911,7 +1911,7 @@ impl Repository {
19111911 let name = CString :: new ( name) ?;
19121912 let message = CString :: new ( message) ?;
19131913 let mut raw = raw:: git_oid {
1914- id : [ 0 ; raw:: GIT_OID_RAWSZ ] ,
1914+ id : [ 0 ; raw:: GIT_OID_MAX_SIZE ] ,
19151915 } ;
19161916 unsafe {
19171917 try_call ! ( raw:: git_tag_create(
@@ -1944,7 +1944,7 @@ impl Repository {
19441944 let name = CString :: new ( name) ?;
19451945 let message = CString :: new ( message) ?;
19461946 let mut raw_oid = raw:: git_oid {
1947- id : [ 0 ; raw:: GIT_OID_RAWSZ ] ,
1947+ id : [ 0 ; raw:: GIT_OID_MAX_SIZE ] ,
19481948 } ;
19491949 unsafe {
19501950 try_call ! ( raw:: git_tag_annotation_create(
@@ -1972,7 +1972,7 @@ impl Repository {
19721972 ) -> Result < Oid , Error > {
19731973 let name = CString :: new ( name) ?;
19741974 let mut raw = raw:: git_oid {
1975- id : [ 0 ; raw:: GIT_OID_RAWSZ ] ,
1975+ id : [ 0 ; raw:: GIT_OID_MAX_SIZE ] ,
19761976 } ;
19771977 unsafe {
19781978 try_call ! ( raw:: git_tag_create_lightweight(
@@ -2348,7 +2348,7 @@ impl Repository {
23482348 let notes_ref = crate :: opt_cstr ( notes_ref) ?;
23492349 let note = CString :: new ( note) ?;
23502350 let mut ret = raw:: git_oid {
2351- id : [ 0 ; raw:: GIT_OID_RAWSZ ] ,
2351+ id : [ 0 ; raw:: GIT_OID_MAX_SIZE ] ,
23522352 } ;
23532353 unsafe {
23542354 try_call ! ( raw:: git_note_create(
@@ -2464,7 +2464,7 @@ impl Repository {
24642464 /// Find a merge base between two commits
24652465 pub fn merge_base ( & self , one : Oid , two : Oid ) -> Result < Oid , Error > {
24662466 let mut raw = raw:: git_oid {
2467- id : [ 0 ; raw:: GIT_OID_RAWSZ ] ,
2467+ id : [ 0 ; raw:: GIT_OID_MAX_SIZE ] ,
24682468 } ;
24692469 unsafe {
24702470 try_call ! ( raw:: git_merge_base(
@@ -2512,7 +2512,7 @@ impl Repository {
25122512 /// given commits, use [`Self::merge_base_octopus`].
25132513 pub fn merge_base_many ( & self , oids : & [ Oid ] ) -> Result < Oid , Error > {
25142514 let mut raw = raw:: git_oid {
2515- id : [ 0 ; raw:: GIT_OID_RAWSZ ] ,
2515+ id : [ 0 ; raw:: GIT_OID_MAX_SIZE ] ,
25162516 } ;
25172517
25182518 unsafe {
@@ -2529,7 +2529,7 @@ impl Repository {
25292529 /// Find a common merge base between all given a list of commits
25302530 pub fn merge_base_octopus ( & self , oids : & [ Oid ] ) -> Result < Oid , Error > {
25312531 let mut raw = raw:: git_oid {
2532- id : [ 0 ; raw:: GIT_OID_RAWSZ ] ,
2532+ id : [ 0 ; raw:: GIT_OID_MAX_SIZE ] ,
25332533 } ;
25342534
25352535 unsafe {
@@ -2974,7 +2974,7 @@ impl Repository {
29742974 ) -> Result < Oid , Error > {
29752975 unsafe {
29762976 let mut raw_oid = raw:: git_oid {
2977- id : [ 0 ; raw:: GIT_OID_RAWSZ ] ,
2977+ id : [ 0 ; raw:: GIT_OID_MAX_SIZE ] ,
29782978 } ;
29792979 let message = crate :: opt_cstr ( message) ?;
29802980 let flags = flags. unwrap_or_else ( StashFlags :: empty) ;
@@ -2996,7 +2996,7 @@ impl Repository {
29962996 ) -> Result < Oid , Error > {
29972997 unsafe {
29982998 let mut raw_oid = raw:: git_oid {
2999- id : [ 0 ; raw:: GIT_OID_RAWSZ ] ,
2999+ id : [ 0 ; raw:: GIT_OID_MAX_SIZE ] ,
30003000 } ;
30013001 let opts = opts. map ( |opts| opts. raw ( ) ) ;
30023002 try_call ! ( raw:: git_stash_save_with_opts(
0 commit comments