Git Patch - GIT binary patch With a literal Payload
A real binary file carried inside a text patch: zlib-deflated, encoded in git's own base85 alphabet, split into length-prefixed lines, and followed by the reverse `literal 0` payload that makes the patch revertible. The index line uses full 40-character hashes because `--binary` implies `--full-index`, and the recorded blob sha1 is the genuine object id of the attached PNG.
From 1993a0ef69bc768f548862093506eddc81f3c120 Mon Sep 17 00:00:00 2001
From: Priya Raman <priya.raman@example.invalid>
Date: Sat, 7 Mar 2026 12:00:00 +0000
Subject: [PATCH] assets: add the status badge
Produced with format-patch --binary, so the blob travels in the patch.
---
assets/badge.png | Bin 0 -> 89 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 assets/badge.png
diff --git a/assets/badge.png b/assets/badge.png
new file mode 100644
index 0000000000000000000000000000000000000000..4fa7b303b313728a89f1da712cd8110ebc839c4e
GIT binary patch
literal 89
zcmeAS@N?(olHy`uVBq!ia0vp^93afW1SGw4HSYi^1y2{pkcwN$0T&7x7iIU`F$fyX
lW?as)OrWJVx{0rhfx$c>o$;VxlP*v#gQu&X%Q~loCIB;-6+8d{
literal 0
HcmV?d00001
--
2.43.0
Specifications
- Seed
- 20260807
- Extended Header
- GIT binary patch
- Files
- 1
- Payload
- literal
- Encoding85
- git base85
- Deflate Level
- 9
- Blob Size
- 89
- Blob Sha1
- 4fa7b303b313728a89f1da712cd8110ebc839c4e
- Full Index
- true
- Line Endings
- LF
Testing contract
Expected to pass- Scenario
- Apply a binary patch with git apply and verify the resulting file's object id.
- Expected result
- assets/badge.png is created with 89 bytes and git hash-object reports 4fa7b303b313728a89f1da712cd8110ebc839c4e.
What is a .patch file?
A .patch file is a unified diff packaged for transmission, most often as produced by `git format-patch`. Beyond the diff itself it carries an email-style header with the author, date, and commit subject, a commit message body, per-file `diff --git` headers recording renames and mode changes, and hunk headers of the form `@@ -old,count +new,count @@`. Applying it reconstructs a specific change against a specific before-state.
How to use this file
Use an example .patch file to test patch application, code-review renderers, and diff parsers: exercising renames, mode changes, binary hunks, added and deleted files, and the `\ No newline at end of file` marker that naive parsers silently drop.
How to use this file for testing
“Git Patch - GIT binary patch With a literal Payload” is a deterministic Testaroo fixture for Visual diff / regression, Metadata testing, Conversion testing. A/B image twins with controlled pixel changes, anti-alias variants, and UI chrome crops for screenshot diff and visual regression tools.
Documented properties for this file: seed 20260807 · LF. Compare results against paired or grouped companions on this page when present (clean↔damaged, searchable↔scanned, or format twins) so scores stay reproducible across runs.
Download the file once, keep the path stable in CI or local scripts, and treat the spec table as the contract: dimensions, seeds, field lists, and roles are intentional. Corrupt or invalid samples are labelled as such, expect parsers to fail loudly rather than silently accept them.
Diff and patch fixtures name their target paths and the exact edge case they exercise, rename, mode change, binary hunk, CRLF↔LF, or missing trailing newline. Apply or render them against the documented before-state; every author, path, and hash is fictional.
Treat A/B twins as a visual regression unit: run your pixel or perceptual diff, assert a non-zero delta on the changed twin, and keep thresholds calibrated against the documented change kind in specs.
Generated by generation/version_control.py. Free for any use, no attribution required, license.
Related files
- patchGit Patch - Abbreviated index HashesThe `index` line abbreviates both blob ids to seven characters, which is what plain format-patch emits and what most patches in the wild carry. Three-way application can still fall back to path matching, but the blobs cannot be looked up unambiguously in a large repository.

- patchGit Patch - Full 40-Character index HashesThe same patch with `--full-index`, so both blob ids are the complete 40 hex characters. This is what `git apply --3way` needs to find the pre-image blob, and comparing the two twins shows a parser must accept any hash length between 4 and 40.

- logGit Blame - Porcelain Format With Repeated Commit HeadersThe stable machine format of git blame: a full header block the first time a commit appears and a bare `<sha> <old> <new>` line every time after, with each source line following on a tab-prefixed line. A parser that expects the header on every group loses the author of every line after the first.

- pdfAlder Table Bistro: Factur-X hybrid invoice PDFFactur-X hybrid invoice PDF for Alder Table Bistro. Invoice INV-BST-5001 rendered for a person and attached as machine-readable XML for a system. The embedded file is named factur-x.xml, is referenced from both the EmbeddedFiles name tree and the document-level AF array with an AFRelationship of Data, and is byte-identical to invoice-facturx-cii.xml. The visible page and the XML agree: net 207.60, GST 10.38, 217.98 CAD due. This is the only file in the set that carries its data twice in one container.

- pdfCedar Street Tacos: Factur-X hybrid invoice PDFFactur-X hybrid invoice PDF for Cedar Street Tacos. Invoice INV-TRK-5001 rendered for a person and attached as machine-readable XML for a system. The embedded file is named factur-x.xml, is referenced from both the EmbeddedFiles name tree and the document-level AF array with an AFRelationship of Data, and is byte-identical to invoice-facturx-cii.xml. The visible page and the XML agree: net 187.70, GST 9.38, 197.08 CAD due. This is the only file in the set that carries its data twice in one container.

- txtConvert v2 Archive SHA-256 ListGNU-style SHA-256 list for the two canonical TAR members, preserving relative paths and full lowercase digests. Stable P8 artifact p8-convert-archive-sha256.
