Expand description
LFS custom-transfer agent (line-oriented JSON protocol).
Implementation of git-lfs-object-store, the LFS custom-transfer
agent for the S3 and Azure Blob backends. The on-bucket layout is
<prefix>/lfs/<oid>.
The agent has two modes:
- Subcommands (
install,enable_debug,disable_debug): one-shot CLI calls that mutate the local repo’sgit config. - Helper REPL (
run::run): newline-delimited JSON over stdin/stdout, dispatched per LFS event (init,upload,download,terminate).
Stdout is the wire protocol — see .claude/rules/protocol-stdout.md.
Diagnostics use tracing configured to write to stderr (or to a
debug log file when invoked with the debug argv slot).
Structs§
- GitRemote
Resolver - Production resolver: opens the local repo via
gix, reads the remote URL, parses it, and builds the matching object-store backend.
Enums§
- Install
Error - Errors surfaced by the install / debug-toggle subcommands.
- RunError
- Errors surfaced by
runthat are fatal to the agent process.
Constants§
- AGENT_
NAME - Custom-transfer agent name registered with
git lfs. The keyslfs.customtransfer.<name>.*are namespaced under this; matches the binary name (git-lfs-object-store).
Traits§
- Remote
Resolver - How to resolve a remote name to an
ObjectStore. Production uses agix-based resolver; tests inject a closure that returns aMockStore(the in-memory test backend gated ontest-util).
Functions§
- disable_
debug - Inverse of
enable_debug: clearlfs.customtransfer.<agent>.args. - enable_
debug - Set
lfs.customtransfer.<agent>.args = debugso the next time git invokes the agent it forwards thedebugargv slot, switching the agent’s logging from stderr to a file in<git-dir>/lfs/tmp/. - install
- Register the agent with
git lfsin the repository atcwd. - run
- Drive the LFS REPL until stdin closes or
terminatearrives.