poka.sh

Docs

PATCH

Generated by scripts/gen-format-pages.py from docs/data/format-metadata/, FILE_FORMATS.csv and docs/formats-master.csv. Do not edit by hand: change the source, then run the script.

Patch / Diff Preview.

At a glance

Purpose A unified diff or patch: the changes between two versions of one or more files, as written by diff -u or git diff.
Extensions .patch, .diff
Poka parser poka-patch
Viewer poka-diff-viewer
Depth tier Parser with a shared viewer (see Depth tiers)
Breadth tier B2 Broad (see Breadth tiers)

How much Poka reads

B2 Broad. The common content of the current and the common older versions is decoded. Some named features or versions are not, and are listed.

Confidence: medium (the reviewer read the code). Basis: Reviewed 2026-10-26: read parsers/poka-patch/src/main.rs (262 lines) and plugin.json. No unit tests or tests/samples.rs; the corpus has cpython_jisx0213-2000-std.txt.diff but no test reads it. Covers .patch and .diff in unified format, with or without git headers. Each file's from and to paths, every hunk (ranges and section header) and every added, removed, context and no-newline line go to the diff viewer.

What Poka does not read

  • A patch that is not valid UTF-8 is refused as a whole
  • Git extended headers are dropped: index hashes, mode changes, renames and copies with similarity, and binary patches
  • Context-format (*** / ---) and normal diffs are not parsed; combined diffs (@@@) are not handled
  • Paths are split on ' b/' in git headers, so quoted paths with spaces can be split wrongly
  • Text before the first file (a commit message or mail header) is not shown
  • Files over 16 MiB are cut (flagged)

Libraries

Libraries Poka uses or has assessed for this format, with the status, licence and language the registry records.

  • patch (candidate; MIT; Rust; https://github.com/uniphil/patch-rs) — Parses and produces unified diffs, tolerant of git output; last release seen Dec 2022
  • unidiff (candidate; MIT; Rust; https://docs.rs/unidiff/latest/unidiff/) — PatchSet/PatchedFile/Hunk model; v0.4.1; repo github.com/messense/unidiff-rs
  • flickzeug (candidate; MIT OR Apache-2.0; Rust; https://github.com/prefix-dev/flickzeug) — A fork of diffy: diff, patch, and merge library featuring Myers' algorithm, unified diff format parsing, fuzzy patch application, and three-way merge with conflict detection; v0.6.0, updated 2026-08-2
  • patchkit (candidate; Apache-2.0; Rust; https://github.com/breezy-team/patchkit) — A library for parsing and manipulating patch files; v0.3.9, updated 2026-09-29; matched on lib.rs, not tested

Sources

  • parsers/poka-patch/src/main.rs
  • parsers/poka-patch/plugin.json