unwrapdiff(1)

unwrapdiff1

Demangle word-wrapped patches

Usage

unwrapdiff [-v] [file ...]

unwrapdiff {[--help] | [--version]}

Overview

unwrapdiff demangles patches that have been word-wrapped, in an attempt to make them useful.

The corrected diff is sent to standard output. Note that you will probably need to use the -l option when applying the patch, in order to ignore any whitespace differences there may be.

Options

-v

Verbose operation. A list of lines that are modified in a way that might be wrong is sent to stderr.

--help

Display a short usage message.

--version

Display the version number of unwrapdiff.

Limitations

Some heuristics are used to decide whether use a space to recombine a wrapped line, or just join them together. Currently this is done by comparing with last three characters of a line with the first two characters of its continuation, and using a space if any of them are different.

The patch needs to have been valid before being word-wrapped.

The last line of a hunk is nearly always ambiguous. If the next line begins “@@”, “Index: ”, “diff ” or “--- ” then it is taken to be complete; otherwise it is unwrapped using the next line.

Releases

12 releases since Debian 3.1 (Sarge); the text changed 6 times.

  1. 3.1
  2. 4.0–5.0
  3. 6.0
  4. 7
  5. 8
  6. 9–10
  7. 11–Arch

Author

Tim Waugh <[email protected]>

Package maintainer

From patchutils 0.4.5-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.