Expand description
Local content-addressable object store for git-lfs.
Objects live under <lfs_dir>/objects/aa/bb/aabbcc… where aabbcc… is
the SHA-256 hex of the content (sharded by the first two hex bytes — see
docs/spec.md). Writes go through a tmp file in <lfs_dir>/tmp/ and are
atomically renamed into place once their hash is known.
use git_lfs_store::Store;
let store = Store::new(".git/lfs");
let mut input: &[u8] = b"hello world";
let (oid, size) = store.insert(&mut input).unwrap();
assert!(store.contains(oid));Structs§
- Store
- A local LFS object store rooted at
<lfs_dir>(typically.git/lfs).