Skip to main content

store_file_object

Function store_file_object 

Source
pub fn store_file_object(
    store: &ObjectStore,
    data: &[u8],
) -> WorktreeResult<Hash>
Expand description

Store a regular file’s bytes as the canonical object and return its content-address.

This is the single source of truth for how file content maps to an object hash, shared by hash_file, build_tree, and mkit add so all three agree on the representation:

§Errors

See WorktreeError.