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]
11                [--addoldprefix=PREFIX] [--addnewprefix=PREFIX] [[-s] |
12                [--status]] [[-i PATTERN] | [--include=PATTERN]] [[-I FILE] |
13                [--include-from-file=FILE]] [[-x PATTERN] |
14                [--exclude=PATTERN]] [[-X FILE] | [--exclude-from-file=FILE]]
15                [[-# RANGE] | [--hunks=RANGE]] [--lines=RANGE] [--files=RANGE]
16                [--annotate] [--as-numbered-lines=WHEN] [--format=FORMAT]
17                [--remove-timestamps] [[-v] | [--verbose]] [[-z] |
18                [--decompress]] [[-E] | [--extended-regexp]] [[-H] |
19                [--with-filename]] [[-h] | [--no-filename]]
20                [--output-matching=WHAT] {[REGEX] | [-f FILE]} [file...]
21
22       grepdiff {[--help] | [--version] | [--list] | [--filter ...]}
23

DESCRIPTION

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

OPTIONS

41       -n, --line-number
42           Display the line number that each patch begins at. If verbose
43           output is requested, each matching hunk is listed as well.
44
45           For a description of the output format see lsdiff(1).
46
47       --number-files
48           File numbers are listed, beginning at 1, before each filename.
49
50       -p n, --strip-match=n
51           When matching, ignore the first n components of the pathname.
52
53       --strip=n
54           Remove the first n components of the pathname before displaying it.
55
56       --addprefix=PREFIX
57           Prefix the pathname with PREFIX before displaying it. This will
58           override any individual settings specified with the --addoldprefix
59           or --addnewprefix options.
60
61       --addoldprefix=PREFIX
62           Prefix pathnames for old or original files in the output by PREFIX.
63
64       --addnewprefix=PREFIX
65           Prefix pathnames for updated or new files in the output by PREFIX.
66
67       -s
68           Show file additions, modifications and removals. A file addition is
69           indicated by a “+”, a removal by a “-”, and a modification by a
70           “!”.
71
72       -i PATTERN, --include=PATTERN
73           Include only files matching PATTERN.
74
75       -I FILE, --include-from-file=FILE
76           Include only files matching any pattern listed in FILE, one pattern
77           per line. All other lines in the input are suppressed.
78
79       -x PATTERN --exclude=PATTERN
80           Exclude files matching PATTERN.
81
82       -X FILE, --exclude-from-file=FILE
83           Exclude files matching any pattern listed in FILE, one pattern per
84           line. All other lines in the input are displayed.
85
86       -# RANGE, --hunks=RANGE
87           Only include hunks within the specified RANGE. Hunks are numbered
88           from 1, and the range is a comma-separated list of numbers or
89           “first-last” spans; either the first or the last in the span may be
90           omitted to indicate no limit in that direction.
91
92       --lines=RANGE
93           Only list hunks that contain lines from the original file that lie
94           within the specified RANGE. Lines are numbered from 1, and the
95           range is a comma-separated list of numbers or “first-last” spans;
96           either the first or the last in the span may be omitted to indicate
97           no limit in that direction.
98
99       --files=RANGE
100           Only list files indicated by the specified RANGE. Files are
101           numbered from 1 in the order they appear in the patch input, and
102           the range is a comma-separated list of numbers or “first-last”
103           spans; either the first or the last in the span may be omitted to
104           indicate no limit in that direction.
105
106       --annotate
107           Annotate each hunk with the filename and hunk number.
108
109       --as-numbered-lines=before|after
110           Instead of a patch fragment, display the lines of the selected
111           hunks with the line number of the file before (or after) the patch
112           is applied, followed by a TAB character and a colon, at the
113           beginning of each line. Each hunk except the first will have a line
114           consisting of “...”  before it.
115
116       --format=unified|context
117           Use specified output format.
118
119       --remove-timestamps
120           Do not include file timestamps in the output.
121
122       -z, --decompress
123           Decompress files with extensions .gz and .bz2.
124
125       -E, --extended-regexp
126           Use POSIX Extended Regular Expression syntax.
127
128       -H, --with-filename
129           Print the name of the patch file containing each match.
130
131       -h, --no-filename
132           Suppress the name of the patch file containing each match.
133
134       -f FILE, --file=FILE
135           Read regular expressions from FILE, one per line.
136
137       --output-matching=hunk|file
138           Display the matching hunk-level or file-level diffs.
139
140       --help
141           Display a short usage message.
142
143       --version
144           Display the version number of grepdiff.
145
146       --filter
147           Behave like filterdiff(1) instead.
148
149       --list
150           Behave like lsdiff(1) instead.
151

SEE ALSO

153       filterdiff(1), lsdiff(1)
154

AUTHOR

156       Tim Waugh <twaugh@redhat.com>
157           Package maintainer
158
159
160
161patchutils                        10 Feb 2011                      GREPDIFF(1)
Impressum