Skip to content

Commit 696ba50

Browse files
committed
adapt to changes in gix-merge
1 parent 70ec8d0 commit 696ba50

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

gitoxide-core/src/repository/merge.rs

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use crate::OutputFormat;
2-
use anyhow::{bail, Context};
2+
use anyhow::{anyhow, bail, Context};
33
use gix::bstr::BString;
44
use gix::bstr::ByteSlice;
55
use gix::merge::blob::builtin_driver::binary;
@@ -83,8 +83,11 @@ pub fn file(
8383
other: Some(theirs.as_bstr()),
8484
};
8585
let mut buf = repo.empty_reusable_buffer();
86-
let (pick, resolution) = platform.merge(&mut buf, labels, repo.command_context()?)?;
87-
let buf = platform.buffer_by_pick(pick).unwrap_or(&buf);
86+
let (pick, resolution) = platform.merge(&mut buf, labels, &repo.command_context()?)?;
87+
let buf = platform
88+
.buffer_by_pick(pick)
89+
.map_err(|_| anyhow!("Participating object was too large"))?
90+
.unwrap_or(&buf);
8891
out.write_all(buf)?;
8992

9093
if resolution == Resolution::Conflict {

0 commit comments

Comments
 (0)