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 the EDITED file.
  • --help β€” Display a short usage message.
  • --version β€” Display the version number of rediff.

πŸ‘€ SEE ALSO πŸ‘€

interdiff(1), recountdiff(1)


πŸŽ€ 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 πŸ’œβœ¨