MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / input_budget

Function input_budget

atomic-cli/src/commands/git/stream.rs:41–47  ·  view source on GitHub ↗
(git: &GitRepository, commit: &git2::Commit<'_>, limit: usize)

Source from the content-addressed store, hash-verified

39}
40
41fn input_budget(git: &GitRepository, commit: &git2::Commit<'_>, limit: usize) -> CliResult<()> {
42 let bytes = input_blob_bytes(git, commit)?;
43 if bytes > limit {
44 return Err(git_error(format!("direct stream commit {} needs {bytes} input bytes, above {limit}; increase the explicit bound", commit.id())));
45 }
46 Ok(())
47}
48
49fn input_blob_bytes(git: &GitRepository, commit: &git2::Commit<'_>) -> CliResult<usize> {
50 let tree = commit.tree().map_err(|e| git_error(e.to_string()))?;

Callers 4

import_graph_streamMethod · 0.85
rolling_sampleFunction · 0.85

Calls 2

input_blob_bytesFunction · 0.85
git_errorFunction · 0.70

Tested by

no test coverage detected