A from-scratch Rust port of Git LFS. The goal is feature parity with the upstream Go binary at the CLI and wire-protocol level, with a clean library split and a better help output in the binaries.
Work in progress. Currently, about 75% of the upstream test suite passes
against this git-lfs implementation. See tests/SCOREBOARD.md
for the per-suite breakdown. The majority of functionality is already
implemented and work end-to-end.
To be completely honest, the reason I started this was that I didn't
like how the help output of git-lfs looks, and I felt I could do
better. Naturally, instead of opening a pull request, I started
reimplementing the whole thing, as one does. And now that I've
started, quitting isn't an option — so Rust is gaining a native
git-lfs.
Jokes aside, implementing git-lfs has been quite a learning exercise. It's more complex than I would have imagined, but it's also well-scoped, and the upstream test suite is genuinely good. The aim is reasonably clean Rust code that can serve as a basis for future experimentation.
Down the line that could mean plugging into gitoxide's gix, or
hosting Git LFS extensions — for example, content-defined chunking to
reduce how much data needs uploading when large files change.
This crate is published on crates.io, you can install it with:
cargo install git-lfs
If you run into an issue, make sure that you have installed the latest version, we push updates as we reach milestones (see the roadmap).
This codebase has two sets of tests. The in-tree Rust tests run through cargo:
cargo test
We also ship the upstream git-lfs test suite. Running it requires
go, prove, and perl — see the
tests README for the full setup. Once those are
in place, our xtask runs the suite and prints a per-suite summary:
cargo xtask test
For the failing suites, the summary includes a count of failing tests so you can spot near-misses.
Building is done using regular cargo builds:
cargo build --release
MIT, with attribution to the upstream Git LFS contributors. See LICENSE.md.