Reftable & native LFS
arks includes a pure-Rust Git Reftable v1/v2 reference backend and a native Git LFS v1 client and server, eliminating external git-lfs subprocesses while keeping full round-trip compatibility with stock Git.
Git Reftable backend (arks refs)
Traditional loose/packed .git/refs directories suffer from filesystem contention and slow case-insensitive lookups in repositories with thousands of branches or tags. arks implements the Git Reftable specification natively:
- Formats:
REFTv1 (SHA-1) and v2 (SHA-256) reader and writer - Indexing & compaction: Prefix compression, 3-byte
restart_offsetbinary search, zlib-compressed reflog blocks, IEEE CRC-32 footer verification, atomictables.list+tables.list.locktransactions, and geometric factor-2 compaction - Transparent dispatch:
arksautomatically detects and reads/writesfilesorreftablerepositories
# Migrate an existing repository from files to reftable:
arks refs migrate --ref-format=reftable
# Verify reftable table integrity and CRC-32 footers:
arks refs verify
# Migrate back to classic files format anytime:
arks refs migrate --ref-format=files
files ↔ reftable round-trip migration is verified against stock git fsck in the Docker clean-room suite.
Native Git LFS v1 client (arks lfs)
arks handles Git LFS pointers, local content-addressed storage, clean/smudge filters, and HTTP transfers directly in Rust with zero external git-lfs binary required:
- Canonical LFS v1 pointer parsing and generation
- Streaming SHA-256 storage under
.git/lfs/objects/{aa}/{bb}/{oid} - In-process
filter=lfsclean/smudge and long-runningfilter-process(pkt-line v2) - Batch API and Basic Transfer client over HTTP/HTTPS
arks lfs track "*.bin"
arks add model.bin .gitattributes
arks commit -m "Track binary asset with native LFS"
arks lfs push origin main
arks lfs pull
Native Git LFS server (arks serve)
arks serve serves Git LFS endpoints out of the box alongside Smart HTTP Git:
| Endpoint | Purpose |
|---|---|
POST /info/lfs/objects/batch |
Negotiate upload/download object actions |
PUT /info/lfs/objects/{oid} |
Streaming SHA-256 verified upload (enforces write auth 401 and archived-repo 403 guard) |
GET /info/lfs/objects/{oid} |
Authenticated object download (enforces private-repo 401 visibility) |
POST /info/lfs/verify |
Verify uploaded object size and digest |
Pass --no-lfs to arks serve if you want to disable the embedded LFS server.
Honesty
Both files ↔ reftable round-trips and native LFS Batch/object round-trips (including PUT /info/lfs/* auth and archived guards) are verified in the Docker clean-room suite. See Completeness.