1 .\" You may copy, distribute and modify under the terms of the LDP General
2 .\" Public License as specified in the LICENSE file that comes with the
3 .\" gnumaniak distribution
5 .\" The author kindly requests that no comments regarding the "better"
6 .\" suitability or up-to-date notices of any info documentation alternative
7 .\" is added without contacting him first.
9 .\" (C) 2002 Ragnar Hojland Espinosa <ragnar@ragnar-hojland.com>
11 .\" GNU diff3 man page
12 .\" man pages are NOT obsolete!
13 .\" <ragnar@ragnar-hojland.com>
14 .TH DIFF3 1 "October 2002" "GNU diff Utilities 2.8.1"
16 \fBdiff3\fP \- find differences between three files
19 [\fB\-3aeimxAETX\fP] [\fB-L\fP \fILABEL\fR] [\fB\-\-easy\-only\fP] [\fB\-\-ed\fP]
20 [\fB\-\-initial\-tab\fR] [\fB\-\-label=\fILABEL\fR] [\fB\-\-merge\fP]
21 [\fB\-\-overlap\-only\fP] [\fB\-\-show\-all\fP] [\fB\-\-show\-overlap\fP]
22 [\fB\-\-text\fP] \fIMINE OLDER YOUR
25 [\fB\-v\fP] [\fB\-\-help\fP] [\fB\-\-version\fP]
28 compares three files and outputs descriptions
31 The files to compare are
36 At most one of these three file names may be
40 to read the standard input for that file.
42 Normally \fBdiff3\fP invokes \fBdiff\fP(1) to do its work, but you can
43 change the program by setting the \fBDIFF\fP environment variable to the
44 name of other program.
47 .B \-3, \-\-easy\-only
50 except output only the nonoverlapping changes.
53 Treat all files as text and compare them line-by-line, even if they
54 do not appear to be text.
59 script that incorporates all the changes from
67 Generate `\fBw\fP' and `\fBq\fP' commands at the end of the
69 script for System V compatibility. This option must be combined with
72 options, and may not be combined with
76 Apply the edit script to the first file and send the result to standard
77 output. Unlike piping the output from \fBdiff3\fP to \fBed\fP
78 this works even for binary files and incomplete lines. \fB\-A\fP is assumed
79 if no edit script option is specified.
81 .B \-x, \-\-overlap\-only
84 except output only the overlapping changes.
87 Incorporate all changes from
93 surrounding all overlapping changes with bracket lines.
95 .B \-E, \-\-show\-overlap
98 except bracket lines from overlapping changes' first
101 an overlapping change looks like this:
105 lines from \fIMINE\fP
107 lines from \fIYOURS\fP
111 .BI "\-L " LABEL ", \-\-label=" LABEL
114 for the brackets output by the
115 \fB\-A\fP, \fB\-E\fP and \fB\-X\fP options. This option may be given up to
116 three times, one for each input file. The default labels are the names of
117 the input files. Thus
118 .B "diff3 \-L X \-L Y \-L Z \-m A B C"
120 .BR "diff3 \-m A B C" ,
121 except that the output looks like it came from
127 rather than from files
134 .B \-T, \-\-initial\-tab
135 Output a tab rather than two spaces before the text of a line in normal format.
136 This causes the alignment of tabs in the line to look normal.
139 Like \fB\-E\fP, except output only the overlapping changes. In other words,
140 like \fB\-x\fP, except bracket changes as in \fB\-E\fP.
143 Print a usage message on standard output and exit successfully.
146 Output the version number of
149 Each hunk begins with a line marked `\fB====\fP'. Three-way hunks have
150 plain `\fB====\fP' lines, and two-way hunks have
151 .RB ` 1 "', " 2 "', or `" 3 '
152 appended to specify which of the three input files differ in that hunk. The
153 hunks contain copies of two or three sets of input lines each preceded by one
154 or two commands identifying where the lines came from. The default behaviour
155 is to precede input lines with two spaces to distinguish them from the
156 commands. If `\fB-T\fP' is specified then \fBdiff3\fP uses a tab instead,
157 lining up any other tabs correctly.
161 This hunk appears after line \fIL\fP of \fIFILE\fP, and contains no lines
162 in that file. To edit this file to yield the other files, one
163 must append hunk lines taken from the other files. For example,
164 `1:11a' means that the hunk follows line 11 in the
165 first file and contains no lines from that file.
168 This hunk contains the lines in the range \fIR\fP of \fIFILE\fP. The
169 range \fIR\fP is a comma-separated pair of line numbers, or just one
170 number if the range is a singleton. To edit this file
171 to yield the other files, one must change the specified lines to be the lines
172 taken from the other files. For example, `2:11,13c' means that
173 the hunk contains lines 11 through 13 from the second file.
175 If the last line in a set of input lines is incomplete it is distinguished
176 on output from a full line by a following line that starts with `\fB\\\fP'.
179 exits with one of the following values:
182 \fBdiff3\fR was successful, no overlapping changes (conflicts) found.
185 Some conflict was found.
190 cmp(1), comm(1), diff(1), ed(1), patch(1), sdiff(1).
192 Report bugs to bug-gnu-utils@gnu.org.
193 Page updated by Ragnar Hojland Espinosa <ragnar@ragnar-hojland.com>