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

Function all_git_objects

atomic-cli/tests/it/git_binding_cb6b_test.rs:103–115  ·  view source on GitHub ↗
(root: &Path)

Source from the content-addressed store, hash-verified

101
102#[allow(dead_code)]
103fn all_git_objects(root: &Path) -> Vec<u8> {
104 let out = Command::new("git")
105 .args(["cat-file", "--batch-all-objects", "--batch"])
106 .current_dir(root)
107 .output()
108 .expect("git cat-file --batch-all-objects");
109 assert!(
110 out.status.success(),
111 "git cat-file failed: {}",
112 output_text(&out)
113 );
114 out.stdout
115}
116
117fn contains_subslice(haystack: &[u8], needle: &[u8]) -> bool {
118 if needle.is_empty() || haystack.len() < needle.len() {

Callers

nothing calls this directly

Calls 1

outputMethod · 0.45

Tested by

no test coverage detected