UNWRAPDIFF(1)

πŸ“¦
version 0.4.5 Β· 2 versions
  • 0.4.5 Β· alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, centos-stream 9, debian bookworm, debian trixie, fedora 43, fedora 44, opensuse-leap 16.0, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 0.3.3 Β· nixos 26.05, nixpkgs unstable
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, centos-stream 9, debian bookworm, debian trixie, fedora 43, fedora 44, opensuse-leap 16.0, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’… UNWRAPDIFF β€” ok bestie, let's talk about your crusty wrapped patches

So like. You know that thing where a patch gets word-wrapped by some email client or whatever and it's completely unusable? Yeah. That's what unwrapdiff is here to fix. It's a little patchutils icon and it demangles word-wrapped patches, fr fr. Manual page UNWRAPDIFF(1), but you can just call her by her name. 🫢


✨ NAME ✨

unwrapdiff β€” demangle word-wrapped patches πŸ’–


πŸŽ€ SYNOPSIS πŸŽ€

unwrapdiff [-v] [file...]

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

🌸 DESCRIPTION 🌸

Okay so here's the tea. unwrapdiff demangles patches that have been word-wrapped, in an attempt to make them useful again. Like it's giving rescue mission. It's giving glow-up. πŸ’…

The corrected diff gets sent to standard output. Simple. Clean. Iconic.

⚠️ Bestie listen β€” you will probably need to use the -l option when applying the patch, so you can ignore any whitespace differences that might be hanging around in there. Do not skip this step. I'm literally begging. 😭

πŸ’œ OPTIONS πŸ’œ

  • -v β€” Verbose operation, i.e. main character mode. A list of lines that are modified in a way that might be wrong gets sent to stderr. So like, it snitches on itself. Very transparent of her. πŸ™ˆ
  • --help β€” Displays a short usage message. The little "hey here's how to use me" moment. πŸŽ€
  • --version β€” Displays the version number of unwrapdiff. Because knowing which era of the icon you're dealing with is important. πŸ‘‘

🌈 LIMITATIONS 🌈

Not everything is perfect, and we're gonna be honest about it, no cap. βœ‹

Some heuristics are used to decide whether to use a space to recombine a wrapped line, or to just join them together. Currently, this is done by comparing the 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. Like she can un-wrap, but she cannot un-corrupt. That's a you problem bestie. πŸ’€

The last line of a hunk is nearly always ambiguous. 😭 So here's how she copes: if the next line begins @@, Index: , diff or --- then it is taken to be complete; otherwise it is unwrapped using the next line. That's the rule. Periodt.


πŸ’– AUTHOR πŸ’–

Tim Waugh <twaugh@redhat.com> β€” Package maintainer 🫢


🌟 SEE YA 🌟

That's the whole page, bestie. Written under the patchutils banner, dated 17 January 2003 β€” vintage, iconic, still slaying. Now go un-wrap those patches and go off. πŸ’…βœ¨πŸ¦‹