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 Novus Examples 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.
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.

- 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.

- azwConvert v2 DRM-Free AZW E-bookDRM-free AZW/MOBI7 e-book source copied byte-for-byte from the catalog's valid reader fixture for legacy import testing. Stable P8 artifact p8-convert-legacy-azw.

- cbrConvert v2 Two-Page CBR ComicValid CBR comic container with two deterministic PNG pages in lexical reading order for legacy comic conversion. Stable P8 artifact p8-convert-legacy-cbr.

Generated by generation/version_control.py. Free for any use, no attribution required — license.