1GREPDIFF(1) Man pages GREPDIFF(1)
2
3
4
6 grepdiff - show files modified by a diff containing a regex
7
9 grepdiff [-n] [--number-files] [-p n] [--strip=n] [--addprefix=PREFIX]
10 [-s] [-i PATTERN] [-x PATTERN] [-v] [-E] [[-H]
11 [--with-filename]] [[-h] [--no-filename]]
12 [--output-matching=WHAT] {[REGEX] [-f FILE]} [file...]
13
14 grepdiff {[--help] [--version] [--list] [--filter ...]}
15
17 For each file modified by a patch, if the patch hunk contains the REGEX
18 then the file's name is printed.
19
20 The regular expression is treated as POSIX Basic Regular Expression
21 syntax, unless the -E option is given in which case POSIX Extended
22 Regular Expression syntax is used.
23
24 For example, to see the patches in my.patch which contain the regular
25 expression “pf_gfp_mask”, use:
26
27 grepdiff pf_gfp_mask my.patch | \
28 xargs -rn1 filterdiff my.patch -i
29
30 You can use both unified and context format diffs with this program.
31
33 -n Display the line number that each patch begins at. If verbose
34 output is requested, each matching hunk is listed as well.
35
36 For a description of the output format see lsdiff(1).
37
38 --number-files
39 File numbers are listed, beginning at 1, before each filename.
40
41 -p n When matching, ignore the first n components of the pathname.
42
43 --strip=n
44 Remove the first n components of the pathname before displaying
45 it.
46
47 --addprefix=PREFIX
48 Prefix the pathname with PREFIX before displaying it.
49
50 -s Show file additions, modifications and removals. A file addition
51 is indicated by a “+”, a removal by a “-”, and a modification by
52 a “!”.
53
54 -i PATTERN
55 Include only files matching PATTERN.
56
57 -x PATTERN
58 Exclude files matching PATTERN.
59
60 -E Use POSIX Extended Regular Expression syntax.
61
62 -H, --with-filename
63 Print the name of the patch file containing each match.
64
65 -h, --no-filename
66 Suppress the name of the patch file containing each match.
67
68 -f FILE
69 Read regular expressions from FILE, one per line.
70
71 --output-matching=hunk|file
72 Display the matching hunk-level or file-level diffs.
73
74 --help Display a short usage message.
75
76 --version
77 Display the version number of grepdiff.
78
79 --filter
80 Behave like filterdiff(1) instead.
81
82 --list Behave like lsdiff(1) instead.
83
85 filterdiff(1), lsdiff(1)
86
88 Tim Waugh <twaugh@redhat.com>.
89
90
91
92patchutils 2 Jul 2004 GREPDIFF(1)