# info > COMBINEDIFF

---
type: CommandReference
command: combinediff
mode: man
section: 1
source: man-pages
---

## Quick Reference

- `combinediff diff1 diff2` — create cumulative patch from two incremental patches
- `combinediff -U 3 diff1 diff2` — display 3 lines of context
- `combinediff -p 1 diff1 diff2` — strip first pathname component
- `combinediff -d '*.c' diff1 diff2` — drop context for files matching pattern
- `combinediff -b diff1 diff2` — ignore changes in whitespace amount
- `combinediff -z diff1.gz diff2.gz` — decompress .gz / .bz2 files
- `combinediff --interpolate diff1 diff2` — run as interdiff
- `combinediff --help` — display usage message

## Name

combinediff - create a cumulative unified patch from two incremental patches

## Synopsis

shell
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]] [[--interpolate] | [--combine]] \
            diff1 diff2
combinediff {[--help] | [--version]}
## Options

- `-p n, --strip-match=n` — Ignore first n pathname components from both patches (similar to `patch -p`).

- `-U n, --unified=n` — Display n lines of context (requires at least n lines in both input files; similar to `diff -U`).

- `-d PAT, --drop-context=PAT` — Do not show context for files matching shell wildcard pattern. May be given multiple times. Slashes and periods are not treated specially.

- `-q, --quiet` — Quieter output; omit rationale lines at patch beginnings.

- `-z, --decompress` — Decompress files with extensions `.gz` and `.bz2`.

- `-b, --ignore-space-change` — Ignore changes in the amount of whitespace.

- `-B, --ignore-blank-lines` — Ignore changes whose lines are all blank.

- `-i, --ignore-case` — Treat upper- and lower-case as identical.

- `-w, --ignore-all-space` — Ignore all whitespace changes in patches.

- `--interpolate` — Run as interdiff (see `interdiff(1)` for behaviour changes).

- `--combine` — Run as combinediff (default).

- `--help` — Display a short usage message.

- `--version` — Display the version number.

## Examples

shell
# Basic cumulative patch
combinediff patch1.patch patch2.patch

# Request 3 lines of context in output
combinediff -U 3 old.patch new.patch

# Strip one directory level
combinediff -p 1 a.patch b.patch

# Suppress context for all .c files
combinediff -d '*.c' first.patch second.patch

# Ignore spacing changes
combinediff -b -w patchA.patch patchB.patch
## See Also

- [interdiff(1)](http://localhost/phpMan.php/man/interdiff/1/markdown) — create diff between two incremental patches

## BUGS

The `-U` option is erratic: it can control context for files modified in both patches, but not for files appearing only in one patch (those appear with the same context as in the input).