Linux Commands Examples

A great documentation place for Linux commands


demangle word-wrapped patches


unwrapdiff [-v] [file...]

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

add an example, a script, a trick and tips

: email address (won't be displayed)
: name

Step 2

Thanks for this example ! - It will be moderated and published shortly.

Feel free to post other examples
Oops ! There is a tiny cockup. A damn 404 cockup. Please contact the loosy team who maintains and develops this wonderful site by clicking in the mighty feedback button on the side of the page. Say what happened. Thanks!


no example yet ...

... Feel free to add your own example above to help other Linux-lovers !


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.



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


Display a short usage message.


Display the version number of unwrapdiff.


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.


Tim Waugh <twaugh[:at:]redhat[:dot:]com>

Package maintainer

How can this site be more helpful to YOU ?

give  feedback