File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -1089,9 +1089,10 @@ impl Repository {
1089
1089
}
1090
1090
}
1091
1091
1092
- /// Create a commit object and return that as a string .
1092
+ /// Create a commit object and return that as a Buf .
1093
1093
///
1094
- /// This string is suitable to be passed to the `commit_signed` function,
1094
+ /// That can be converted to a string like this `str::from_utf8(&buf).unwrap().to_string()`.
1095
+ /// And that string can be passed to the `commit_signed` function,
1095
1096
/// the arguments behave the same as in the `commit` function.
1096
1097
pub fn commit_create_buffer (
1097
1098
& self ,
@@ -1100,7 +1101,7 @@ impl Repository {
1100
1101
message : & str ,
1101
1102
tree : & Tree < ' _ > ,
1102
1103
parents : & [ & Commit < ' _ > ] ,
1103
- ) -> Result < String , Error > {
1104
+ ) -> Result < Buf , Error > {
1104
1105
let mut parent_ptrs = parents
1105
1106
. iter ( )
1106
1107
. map ( |p| p. raw ( ) as * const raw:: git_commit )
@@ -1119,7 +1120,7 @@ impl Repository {
1119
1120
parents. len( ) as size_t,
1120
1121
parent_ptrs. as_mut_ptr( )
1121
1122
) ) ;
1122
- Ok ( str :: from_utf8 ( & buf) . unwrap ( ) . to_string ( ) )
1123
+ Ok ( buf)
1123
1124
}
1124
1125
}
1125
1126
You can’t perform that action at this time.
0 commit comments