From 02ceaccbb47a5b711c168b56dadc581ea03525dc Mon Sep 17 00:00:00 2001 From: Matthew Suozzo Date: Sun, 11 Oct 2026 15:50:52 -0400 Subject: [PATCH] fix: initialize libgit2 in merge_file `merge_file` called into libgit2 without `crate::init()`, so when it ran before anything else had initialized the library, libgit2's placeholder allocator failed every allocation and the merge returned an error with no message. --- src/merge.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/merge.rs b/src/merge.rs index 401d68ca5a..b1f18bca4a 100644 --- a/src/merge.rs +++ b/src/merge.rs @@ -504,6 +504,7 @@ pub fn merge_file( theirs: &MergeFileInput<'_>, opts: Option<&mut MergeFileOptions>, ) -> Result { + crate::init(); let ancestor = ancestor.raw(); let ours = ours.raw(); let theirs = theirs.raw();