1GREPDIFF(1)                        Man pages                       GREPDIFF(1)
2
3
4

NAME

6       grepdiff - show files modified by a diff containing a regex
7

SYNOPSIS

9       grepdiff [[-n] | [--line-number]] [--number-files] [[-p n] |
10                [--strip-match=n]] [--strip=n] [--addprefix=PREFIX] [[-s] |
11                [--status]] [[-i PATTERN] | [--include=PATTERN]] [[-x PATTERN]
12                | [--exclude=PATTERN]] [[-v] | [--verbose]] [[-E] |
13                [--extended-regexp]] [[-H] | [--with-filename]] [[-h] |
14                [--no-filename]] [--output-matching=WHAT] {[REGEX] |
15                [-f FILE]} [file...]
16
17       grepdiff {[--help] | [--version] | [--list] | [--filter ...]}
18

DESCRIPTION

20       For each file modified by a patch, if the patch hunk contains the REGEX
21       then the file´s name is printed.
22
23       The regular expression is treated as POSIX Basic Regular Expression
24       syntax, unless the -E option is given in which case POSIX Extended
25       Regular Expression syntax is used.
26
27       For example, to see the patches in my.patch which contain the regular
28       expression “pf_gfp_mask”, use:
29
30           grepdiff pf_gfp_mask my.patch | \
31             xargs -rn1 filterdiff my.patch -i
32
33       You can use both unified and context format diffs with this program.
34

OPTIONS

36       -n, --line-number
37           Display the line number that each patch begins at. If verbose
38           output is requested, each matching hunk is listed as well.
39
40           For a description of the output format see lsdiff(1).
41
42       --number-files
43           File numbers are listed, beginning at 1, before each filename.
44
45       -p n, --strip-match=n
46           When matching, ignore the first n components of the pathname.
47
48       --strip=n
49           Remove the first n components of the pathname before displaying it.
50
51       --addprefix=PREFIX
52           Prefix the pathname with PREFIX before displaying it.
53
54       -s
55           Show file additions, modifications and removals. A file addition is
56           indicated by a “+”, a removal by a “-”, and a modification by a
57           “!”.
58
59       -i PATTERN, --include=PATTERN
60           Include only files matching PATTERN.
61
62       -x PATTERN --exclude=PATTERN
63           Exclude files matching PATTERN.
64
65       -E, --extended-regexp
66           Use POSIX Extended Regular Expression syntax.
67
68       -H, --with-filename
69           Print the name of the patch file containing each match.
70
71       -h, --no-filename
72           Suppress the name of the patch file containing each match.
73
74       -f FILE, --file=FILE
75           Read regular expressions from FILE, one per line.
76
77       --output-matching=hunk|file
78           Display the matching hunk-level or file-level diffs.
79
80       --help
81           Display a short usage message.
82
83       --version
84           Display the version number of grepdiff.
85
86       --filter
87           Behave like filterdiff(1) instead.
88
89       --list
90           Behave like lsdiff(1) instead.
91

SEE ALSO

93       filterdiff(1), lsdiff(1)
94

AUTHOR

96       Tim Waugh <twaugh@redhat.com>
97           Package maintainer
98
99
100
101patchutils                        23 Jan 2009                      GREPDIFF(1)
Impressum