File: lsdiff.1

package info (click to toggle)
patchutils 0.2.11-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 800 kB
  • ctags: 182
  • sloc: ansic: 3,496; sh: 2,547; xml: 997; makefile: 193; perl: 101
file content (116 lines) | stat: -rw-r--r-- 1,911 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
.\"Generated by db2man.xsl. Don't modify this, modify the source.
.de Sh \" Subsection
.br
.if t .Sp
.ne 5
.PP
\fB\\$1\fR
.PP
..
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Ip \" List item
.br
.ie \\n(.$>=3 .ne \\$3
.el .ne 3
.IP "\\$1" \\$2
..
.TH "LSDIFF" 1 "31 Jan 2002" "patchutils" ""
.SH NAME
lsdiff \- show which files are modified by a patch
.SH "SYNOPSIS"

.nf
\fBlsdiff\fR [-n] [-p \fIn\fR] [-s] [-i \fIPATTERN\fR] [-x \fIPATTERN\fR] [\fIfile\fR...]
      
.fi

.nf
\fBlsdiff\fR {--help | --version | --filter ... | --grep ...}
.fi

.SH "DESCRIPTION"

.PP
List the files modified by a patch.

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

.SH "OPTIONS"

.TP
\fB-n\fR
Display the line number that each patch begins at.

.TP
\fB-p\fR \fIn\fR
Strip the first \fIn\fR components of the pathname.

.TP
\fB-s\fR
Show file additions, modifications and removals. A file addition is indicated by a ``+'', a removal by a ``-'', and a modification by a ``!''.

.TP
\fB-i\fR \fIPATTERN\fR
Include only files matching \fIPATTERN\fR.

.TP
\fB-x\fR \fIPATTERN\fR
Exclude files matching \fIPATTERN\fR.

.TP
\fB--help\fR
Display a short usage message.

.TP
\fB--version\fR
Display the version number of lsdiff.

.TP
\fB--filter\fR
Behave like \fBfilterdiff\fR(1) instead.

.TP
\fB--grep\fR
Behave like \fBgrepdiff\fR(1) instead.

.SH "SEE ALSO"

.PP
\fBfilterdiff\fR(1), \fBgrepdiff\fR(1)

.SH "EXAMPLES"

.PP
To sort the order of touched files in a patch, you can use:

.IP
.nf
lsdiff patch | sort -u | \\
  xargs -rn1 filterdiff patch -i
.fi

.PP
To show only added files in a patch:

.IP
.nf
lsdiff -s patch | grep '^+' | \\
  cut -c2- | xargs -rn1 filterdiff patch -i
.fi

.PP
To show the headers of all file hunks:

.IP
.nf
lsdiff -n patch | (while read n file
  do sed -ne "$n,$(($n+1))p" patch
done)
.fi

.SH AUTHOR
Tim Waugh <twaugh@redhat.com>.