Skip to content
Guides
On this page
  1. Git Reftable backend (arks refs)
  2. Native Git LFS v1 client (arks lfs)
  3. Native Git LFS server (arks serve)
  4. Honesty
  5. Next

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)

Classic Files Ref-Store vs Pure-Rust Reftable v1/v2

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: REFT v1 (SHA-1) and v2 (SHA-256) reader and writer
  • Indexing & compaction: Prefix compression, 3-byte restart_offset binary search, zlib-compressed reflog blocks, IEEE CRC-32 footer verification, atomic tables.list + tables.list.lock transactions, and geometric factor-2 compaction
  • Transparent dispatch: arks automatically detects and reads/writes files or reftable repositories
# 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=lfs clean/smudge and long-running filter-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.

Next

History & maintenance Self-host Workflows Git vs arks

Edit this page

Back to top