Skip to content

Commit 90a45bb

Browse files
authored
Add a missing initialization in Diff::from_buffer (#701)
1 parent f46e8ff commit 90a45bb

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/diff.rs

+1
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,7 @@ impl Diff<'static> {
309309
/// a patch file likely contains abbreviated object IDs, so the
310310
/// object IDs parsed by this function will also be abreviated.
311311
pub fn from_buffer(buffer: &[u8]) -> Result<Diff<'static>, Error> {
312+
crate::init();
312313
let mut diff: *mut raw::git_diff = std::ptr::null_mut();
313314
unsafe {
314315
// NOTE: Doesn't depend on repo, so lifetime can be 'static

0 commit comments

Comments
 (0)