Skip to main content

Module patch

Module patch 

Source
Expand description

torii patch — export commits as patch files and apply them.

Two subcommands:

  • torii patch export <range> → ≡ git format-patch <range> Produces one .patch file per commit, suitable for email or archive.
  • torii patch apply <file>... → ≡ git am <file>... Applies one or more .patch files as new commits, preserving authorship and message.

Wrapper rationale: same as subtree and archive. git format-patch / git am have decades of edge-case handling around mailbox parsing, base64 binary blobs, 3-way fallback, etc. Reimplementing those on top of libgit2 would be 800-1500 LOC of risk; the wrapper is ~80.

Structs§

ApplyOpts
ExportOpts

Functions§

apply
export