REDIFF(1)
π¦ REDIFF(1) π¦
okay so bestie, welcome to the rediff page β it lives in the patchutils corner of section 1 of the manual, and honestly? it's giving lifesaver. no cap.
β¨ NAME β¨
rediff, editdiff β fix offsets and counts of a hand-edited diff π
πΈ SYNOPSIS πΈ
rediff [--in-place] ORIGINAL EDITED
rediff [--in-place] EDITED
rediff {[--help] | [--version]}
editdiff FILE
editdiff {[--help] | [--version]}
π DESCRIPTION π
So here's the vibe: you can use rediff to correct a hand-edited unified diff. Like, take a copy of the diff you wanna edit, and edit it β but without touching any of the offsets or counts (you know, the lines that start with @@). Then you run rediff, tell it the name of the original diff file and the name of the one you've edited, and it'll spit out the edited diff file but with the offsets and counts all fixed up. iconic behaviour honestly.
A little script called editdiff is provided for editing a diff file in-place. tiny, but it eats. π
The types of changes that are currently handled are:
- Modifying the text of any file content line (of course π).
- Adding new line insertions or deletions.
- Adding, changing or removing context lines. Lines at the context horizon are dealt with by adjusting the offset and/or count.
- Adding a single hunk (
@@-prefixed section). - Removing multiple hunk (
@@-prefixed sections).
Alternatively, if only one argument is provided, it's taken to be the edited file and the counts and offsets are adjusted as appropriate. Some assumptions are made when used in this mode. See recountdiff(1) for more information. π
β¨ OPTIONS β¨
--in-placeβ Write output to the original edited file instead of standard output. When used with two arguments, the result is written back to theEDITEDfile.--helpβ Display a short usage message.--versionβ Display the version number ofrediff.
π SEE ALSO π
π AUTHOR π
Tim Waugh <twaugh@redhat.com> Package maintainer
fr fr, that's the whole page. go forth and fix your diffs, bestie π«Ά
patchutils Β· 13 May 2002 Β· mwah, that's the version and date, bye babes πβ¨
π¦ where this page comes from
- alpine 3.23: patchutils-doc 0.4.4-r0 Β· GPL-2.0-or-later
- alpine 3.24: patchutils-doc 0.4.5-r0 Β· GPL-2.0-or-later
- arch rolling: patchutils 0.4.5-1 Β· GPL-2.0-only
- fedora 44: patchutils 0.4.4-3.fc44 Β· GPL-2.0-or-later
- ubuntu resolute: patchutils 0.4.3-1ubuntu1 Β· GPL-2.0-or-later
- ubuntu stonking: patchutils 0.4.5-1ubuntu1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms