FILTERDIFF(1)

NAME
filterdiff - extract or exclude diffs from a diff file

SYNOPSIS
filterdiff [-i PATTERN] [-p n] [--strip= n] [--addprefix= PREFIX]
           [-x PATTERN] [-z] [file...]
filterdiff {--help | --version | --list | --grep ...}

DESCRIPTION

You can use filterdiff to obtain a patch that applies to files matching the shell wildcard PATTERN from a larger collection of patches. For example, to see the patches in patch-2.4.3.gz that apply to all files called lp.c:

    filterdiff -z -i '*/lp.c' patch-2.4.3.gz

If neither -i nor -x options are given, -i '*' is assumed. To remove lines from a file that are not part of a patch, you might do this:

    filterdiff message > patch

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 to fnmatch). This is so that ``*/basename''-type patterns can be given without limiting the number of pathname components.

You can use both unified and context format diffs with this program.

OPTIONS

-i PATTERN
    Include only files matching PATTERN. All other lines in the input are suppressed.

-p n
    When matching, ignore the first n components of the pathname.

--strip=n
    Remove the first n components of pathnames in the output.

--addprefix=PREFIX
    Prefix pathnames in the output by PREFIX.

-x PATTERN
    Exclude files matching PATTERN. All other lines in the input are displayed.

-z  Decompress files with extensions .gz and .bz2.

--help
    Display a short usage message.

--version
    Display the version number of filterdiff.

--list
    Behave like lsdiff(1) instead.

--grep
    Behave like grepdiff(1) instead.

SEE ALSO

lsdiff(1), grepdiff(1)

AUTHOR
Tim Waugh <twaugh@redhat.com>.