COMBINEDIFF(1)
π COMBINEDIFF β the combinediff manual, bestie edition π
okay so you want to smash two patches together into one cumulative glow-up? combinediff is literally your girl. she lives in patchutils, section 1 of the manual pages, and she's about to make your incremental patches hold hands. π«Ά
β¨ NAME β¨
combinediff β create a cumulative unified patch from two incremental patches π
π SYNOPSIS π
combinediff [[-p n] | [--strip-match=n]] [[-U n] | [--unified=n]]
[[-d PAT] | [--drop-context=PAT]] [[-q] | [--quiet]] [[-z] |
[--decompress]] [[-b] | [--ignore-space-change]] [[-B] |
[--ignore-blank-lines]] [[-i] | [--ignore-case]] [[-w] |
[--ignore-all-space]] [--color=WHEN] [[--interpolate] |
[--combine]] diff1 diff2
combinediff {[--help] | [--version]}
like. that's the whole vibe. two diffs, one destiny. π
π¦ DESCRIPTION π¦
combinediff creates a unified diff that expresses the sum of two diffs. no cap. it's giving "you two patches are getting married." π
The diff files must be listed in the order that they are to be applied. order matters bestie, do not play with me here. π
For best results, the diffs must have at least three lines of context. three. minimum. that's the rule. β¨
Since combinediff doesn't have the advantage of being able to look at the files that are to be modified, it has stricter requirements on the input format than patch(1) does. The output of GNU diff will be okay, even with extensions, but if you intend to use a hand-edited patch it might be wise to clean up the offsets and counts using recountdiff(1) first. (yes bestie, go clean yourself up first. self-care.) π§
Note, however, that the two patches must be in strict incremental order. In other words, the second patch must be relative to the state of the original set of files after the first patch was applied. this is not optional. this is the whole entire point. π
The diffs may be in context format. The output, however, will be in unified format. so like, she takes context on the way in, and serves unified on the way out. a true queen of transformation π
π OPTIONS π
-pn,--strip-match=nβ When comparing filenames, ignore the first n pathname components from both patches. (This is similar to the-poption to GNU patch(1).) If this option is not specified, combinediff will automatically determine the optimal number of path components to strip by finding the smallest value where at least one file matches between the two patches. she's smart like that. she does the math for you. π§ β¨-q,--quietβ Quieter output. Don't emit rationale lines at the beginning of each patch. shhh. π€«-Un,--unified=nβ Attempt to display n lines of context (requires at least n lines of context in both input files). (This is similar to the-Uoption to GNU diff(1).)-dpattern,--drop-context=PATTERNβ Don't display any context on files that match the shell wildcard pattern. This option can be given multiple times. π Note that the interpretation of the shell wildcard pattern does not count slash characters or periods as special (in other words, no flags are given tofnmatch). This is so that β*/basenameβ-type patterns can be given without limiting the number of pathname components. iykyk π-i,--ignore-caseβ Consider upper- and lower-case to be the same.Aanda? same girl, different font. π-w,--ignore-all-spaceβ Ignore whitespace changes in patches. Also makes patch application ignore whitespace when reconstructing files. whitespace? never met her. π«₯-b,--ignore-space-changeβ Ignore changes in the amount of whitespace. like, you added a space? cute. don't care. πΈ-B,--ignore-blank-linesβ Ignore changes whose lines are all blank. blank lines are just vibes anyway. π--color=WHENβ colorize the output; WHEN can be'never','always', or'auto'(default:auto, use'never'to disable). yes bestie, she can serve lewks. π-z,--decompressβ Decompress files with extensions.gzand.bz2. unzip her, unzip her. π--interpolateβ Run as βinterdiffβ. See interdiff(1) for more information about how the behaviour is altered in this mode. she's wearing a different outfit now. π--combineβ Run as βcombinediffβ. This is the default. the original girl. the blueprint. π--helpβ Display a short usage message. she'll tell you what's up, briefly. π«Ά--versionβ Display the version number of combinediff. π
π BUGS π
The -U option is a bit erratic: it can control the amount of context displayed for files that are modified in both patches, but not for files that only appear in one patch (which appear with the same amount of context in the output as in the input).
so like. she's doing her best. one patch files get ignored by -U. not me defending her but also yes me defending her. ππ
π SEE ALSO π
π AUTHOR π
Tim Waugh <twaugh@redhat.com> Package maintainer
and that's the whole entire manual, bestie. go forth and combine those diffs. slay. periodt. πβ¨ππ¦πΈπ π«Ά
this page came from patchutils, dated 23 Jan 2009 β yes she's an elder but she ate and left no crumbs. πβπ
π¦ 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 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