Skip to main content

Module git

Module git 

Source
Expand description

Git Smart HTTP server implementation

Serves virtual repositories over Git’s Smart HTTP transport. The LLM (or a script/static handler) supplies the repository content; this module compiles it into real Git objects and frames them for the wire.

Protocol URLs:

  • GET //info/refs?service=git-upload-pack - Reference discovery
  • POST //git-upload-pack - Object transfer

Read-only (clone/fetch). There is no git-receive-pack endpoint, so pushes are refused.

Both endpoints raise an Event through call_llm, which means script and static event_handlers work here exactly as they do for every other protocol - and a static handler is the only way to guarantee the two requests of a clone see the same snapshot.

Modules§

actions
Git Smart HTTP protocol actions
pack
Git object and pack-file construction.
pktline
Git pkt-line framing and git-upload-pack request parsing.

Structs§

GitServer
Git Smart HTTP server

Constants§

MAX_UPLOAD_PACK_BYTES
Largest POST /git-upload-pack body this server will buffer, in bytes.