{"record":{"id":"a066e7edc4de9704","repo":"GitoxideLabs/gitoxide","slug":"participating-object-was-too-large","errorCode":null,"errorMessage":"Participating object was too large","messagePattern":"Participating object was too large","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"gitoxide-core/src/repository/merge/file.rs","lineNumber":82,"sourceCode":"        options.text.conflict = conflict;\n        options.resolve_binary_with = match conflict {\n            Conflict::Keep { .. } => None,\n            Conflict::ResolveWithOurs => Some(binary::ResolveWith::Ours),\n            Conflict::ResolveWithTheirs => Some(binary::ResolveWith::Theirs),\n            Conflict::ResolveWithUnion => None,\n        };\n    }\n    let platform = cache.prepare_merge(&repo.objects, options)?;\n    let labels = gix::merge::blob::builtin_driver::text::Labels {\n        ancestor: Some(base.as_ref()),\n        current: Some(ours.as_ref()),\n        other: Some(theirs.as_ref()),\n    };\n    let mut buf = repo.empty_reusable_buffer();\n    let (pick, resolution) = platform.merge(&mut buf, labels, &repo.command_context()?)?;\n    let buf = platform\n        .buffer_by_pick(pick)\n        .map_err(|_| anyhow!(\"Participating object was too large\"))?\n        .unwrap_or(&buf);\n    out.write_all(buf)?;\n\n    if resolution == Resolution::Conflict {\n        bail!(\"File conflicted\")\n    }\n    Ok(())\n}\n\nfn worktree_roots(\n    base: Option<gix::Id<'_>>,\n    ours: Option<gix::Id<'_>>,\n    theirs: Option<gix::Id<'_>>,\n    workdir: Option<&Path>,\n) -> anyhow::Result<gix::merge::blob::pipeline::WorktreeRoots> {\n    let roots = if base.is_none() || ours.is_none() || theirs.is_none() {\n        let workdir = workdir.context(\"A workdir is required if one of the bases are provided as path.\")?;\n        gix::merge::blob::pipeline::WorktreeRoots {","sourceCodeStart":64,"sourceCodeEnd":100,"githubUrl":"https://github.com/GitoxideLabs/gitoxide/blob/e73179060badf27222d790981fac3f84c1830a7e/gitoxide-core/src/repository/merge/file.rs#L64-L100","documentation":"Thrown by `file` in `gix repo merge file` when `platform.buffer_by_pick(pick)` fails, which happens when a merge input blob exceeded the size limit the merger can handle in memory. The merge of an oversized participating object cannot produce a pick buffer, so the command aborts with this fixed message.","triggerScenarios":"Running `gix repo merge file <ours> <theirs>` (via `file`) where one of the involved blobs is larger than the merger's internal size threshold, causing `buffer_by_pick` to return an `Err` mapped to `anyhow!(\"Participating object was too large\")`.","commonSituations":"Merging huge generated files, minified bundles, large JSON/CSV data files, or datasets committed to the repo that exceed practical merge limits.","solutions":["Merge the files manually with an external tool (e.g. `git merge-file` or a 3-way merge GUI) and commit the result","Exclude huge files from merges via `.gitattributes` with `merge=ours` or a custom driver","Store large blobs in LFS or split them into smaller chunks so the in-memory merger can handle them"],"exampleFix":"// .gitattributes\n// before: data.json merge=default\n// after\ndata.json merge=ours -diff  # avoid in-memory merge of huge blob","handlingStrategy":"fallback","validationCode":"// guard: refuse huge blobs before invoking the file merger\nconst MAX_MERGE_BYTES: usize = 64 * 1024 * 1024;\nif ours_len.max(theirs_len).max(base_len) > MAX_MERGE_BYTES {\n    return Err(\"input too large for in-memory merge; use external merge tool\".into());\n}","typeGuard":null,"tryCatchPattern":"match merge_file(ours, base, theirs) {\n    Err(e) if e.to_string().contains(\"too large\") => {\n        // fall back to `git merge-file` or manual resolution\n    }\n    other => other?,\n}","preventionTips":["Keep generated or large data files out of git (use LFS or artifact storage)","Configure `merge=ours` or custom drivers for files known to be huge","Set size checks in pre-commit hooks to block oversized blobs"],"tags":["merge","file","size-limit","blob","gitoxide"],"backgroundTag":"payload-too-large","analyzedSha":"e73179060badf27222d790981fac3f84c1830a7e","analyzedAt":"2026-09-08T11:26:50.865Z","contentChangedAt":"2026-09-08T11:26:50.865Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}