File tree 1 file changed +6
-3
lines changed
gitoxide-core/src/repository
1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 1
1
use crate :: OutputFormat ;
2
- use anyhow:: { bail, Context } ;
2
+ use anyhow:: { anyhow , bail, Context } ;
3
3
use gix:: bstr:: BString ;
4
4
use gix:: bstr:: ByteSlice ;
5
5
use gix:: merge:: blob:: builtin_driver:: binary;
@@ -83,8 +83,11 @@ pub fn file(
83
83
other : Some ( theirs. as_bstr ( ) ) ,
84
84
} ;
85
85
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) ;
88
91
out. write_all ( buf) ?;
89
92
90
93
if resolution == Resolution :: Conflict {
You can’t perform that action at this time.
0 commit comments