File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
gitoxide-core/src/repository Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 11use crate :: OutputFormat ;
2- use anyhow:: { bail, Context } ;
2+ use anyhow:: { anyhow , bail, Context } ;
33use gix:: bstr:: BString ;
44use gix:: bstr:: ByteSlice ;
55use 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 {
You can’t perform that action at this time.
0 commit comments