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

Function raw_bytes_of

atomic-repository/src/repository/projection_commit.rs:738–744  ·  view source on GitHub ↗
(git: &git2::Repository, oid: git2::Oid)

Source from the content-addressed store, hash-verified

736 }
737
738 fn raw_bytes_of(git: &git2::Repository, oid: git2::Oid) -> Vec<u8> {
739 let content = object_content_of(git, oid);
740 let header = format!("commit {}\0", content.len());
741 let mut raw = header.into_bytes();
742 raw.extend_from_slice(&content);
743 raw
744 }
745
746 /// Full object content (headers + message), without the `commit N\0`
747 /// prefix — the same bytes `git cat-file commit <oid>` prints.

Calls 1

object_content_ofFunction · 0.85