cvsdist 70d82c0
.TH DIFF3 1 "22sep1993" "GNU Tools" "GNU Tools"
cvsdist 70d82c0
.SH NAME
cvsdist 70d82c0
diff3 \- find differences between three files
cvsdist 70d82c0
.SH SYNOPSIS
cvsdist 70d82c0
.B diff3
cvsdist 70d82c0
[options] mine older yours
cvsdist 70d82c0
.SH DESCRIPTION
cvsdist 70d82c0
The
cvsdist 70d82c0
.I diff3
cvsdist 70d82c0
command compares three files and outputs descriptions
cvsdist 70d82c0
of their differences.
cvsdist 70d82c0
cvsdist 70d82c0
The files to compare are
cvsdist 70d82c0
.IR mine ,
cvsdist 70d82c0
.IR older ,
cvsdist 70d82c0
and
cvsdist 70d82c0
.IR yours .
cvsdist 70d82c0
At most one of these three file names may be
cvsdist 70d82c0
.BR \- ,
cvsdist 70d82c0
which tells
cvsdist 70d82c0
.I diff3
cvsdist 70d82c0
to read the standard input for that file.
cvsdist 70d82c0
.SS Options
cvsdist 70d82c0
Below is a summary of all of the options that GNU
cvsdist 70d82c0
.I diff3
cvsdist 70d82c0
accepts.  Multiple single letter options (unless they take an argument)
cvsdist 70d82c0
can be combined into a single command line argument.
cvsdist 70d82c0
.TP
cvsdist 70d82c0
.B \-a
cvsdist 70d82c0
Treat all files as text and compare them line-by-line, even if they
cvsdist 70d82c0
do not appear to be text.
cvsdist 70d82c0
.TP
cvsdist 70d82c0
.B \-A
cvsdist 70d82c0
Incorporate all changes from
cvsdist 70d82c0
.I older
cvsdist 70d82c0
to
cvsdist 70d82c0
.I yours
cvsdist 70d82c0
into
cvsdist 70d82c0
.IR mine ,
cvsdist 70d82c0
surrounding all conflicts with bracket lines.
cvsdist 70d82c0
.TP
cvsdist 70d82c0
.B \-B
cvsdist 70d82c0
Old behavior of -A.  Shows non-conflicts.
cvsdist 70d82c0
.TP
cvsdist 70d82c0
.B \-e
cvsdist 70d82c0
Generate an
cvsdist 70d82c0
.I ed
cvsdist 70d82c0
script that incorporates all the changes from
cvsdist 70d82c0
.I older
cvsdist 70d82c0
to
cvsdist 70d82c0
.I yours
cvsdist 70d82c0
into
cvsdist 70d82c0
.IR mine .
cvsdist 70d82c0
.TP
cvsdist 70d82c0
.B \-E
cvsdist 70d82c0
Like
cvsdist 70d82c0
.BR \-e ,
cvsdist 70d82c0
except bracket lines from overlapping changes' first
cvsdist 70d82c0
and third files.
cvsdist 70d82c0
With
cvsdist 70d82c0
.BR \-e ,
cvsdist 70d82c0
an overlapping change looks like this:
cvsdist 70d82c0
.sp
cvsdist 70d82c0
.nf
cvsdist 70d82c0
<<<<<<< \fImine\fP
cvsdist 70d82c0
lines from \fImine\fP
cvsdist 70d82c0
=======
cvsdist 70d82c0
lines from \fIyours\fP
cvsdist 70d82c0
>>>>>>> \fIyours\fP
cvsdist 70d82c0
.fi
cvsdist 70d82c0
.TP
cvsdist 70d82c0
.B \-\-ed
cvsdist 70d82c0
Generate an
cvsdist 70d82c0
.I ed
cvsdist 70d82c0
script that incorporates all the changes from
cvsdist 70d82c0
.I older
cvsdist 70d82c0
to
cvsdist 70d82c0
.I yours
cvsdist 70d82c0
into
cvsdist 70d82c0
.IR mine .
cvsdist 70d82c0
.TP
cvsdist 70d82c0
.B \-\-easy\-only
cvsdist 70d82c0
Like
cvsdist 70d82c0
.BR \-e ,
cvsdist 70d82c0
except output only the nonoverlapping changes.
cvsdist 70d82c0
.TP
cvsdist 70d82c0
.B \-i
cvsdist 70d82c0
Generate
cvsdist 70d82c0
.B w
cvsdist 70d82c0
and
cvsdist 70d82c0
.B q
cvsdist 70d82c0
commands at the end of the
cvsdist 70d82c0
.I ed
cvsdist 70d82c0
script for System V compatibility.  This option must be combined with
cvsdist 70d82c0
one of the
cvsdist 70d82c0
.B \-AeExX3
cvsdist 70d82c0
options, and may not be combined with
cvsdist 70d82c0
.BR \-m .
cvsdist 70d82c0
.TP
cvsdist 70d82c0
.B \-\-initial\-tab
cvsdist 70d82c0
Output a tab rather than two spaces before the text of a line in normal format.
cvsdist 70d82c0
This causes the alignment of tabs in the line to look normal.
cvsdist 70d82c0
.TP
cvsdist 70d82c0
.BI "\-L " label
cvsdist 70d82c0
.ns
cvsdist 70d82c0
.TP
cvsdist 70d82c0
.BI \-\-label= label
cvsdist 70d82c0
Use the label
cvsdist 70d82c0
.I label
cvsdist 70d82c0
for the brackets output by the
cvsdist 70d82c0
.BR \-A ,
cvsdist 70d82c0
.B \-E
cvsdist 70d82c0
and
cvsdist 70d82c0
.B \-X
cvsdist 70d82c0
options.  This option may be given up to three
cvsdist 70d82c0
times, one for each input file.  The default labels are the names of
cvsdist 70d82c0
the input files.  Thus
cvsdist 70d82c0
.B "diff3 \-L X \-L Y \-L Z \-m A B C"
cvsdist 70d82c0
acts like
cvsdist 70d82c0
.BR "diff3 \-m A B C ,
cvsdist 70d82c0
except that the output looks like it came from
cvsdist 70d82c0
files named
cvsdist 70d82c0
.BR X ,
cvsdist 70d82c0
.B Y
cvsdist 70d82c0
and
cvsdist 70d82c0
.B Z
cvsdist 70d82c0
rather than from files
cvsdist 70d82c0
named
cvsdist 70d82c0
.BR A ,
cvsdist 70d82c0
.B B
cvsdist 70d82c0
and
cvsdist 70d82c0
.BR C .
cvsdist 70d82c0
.TP
cvsdist 70d82c0
.B \-m
cvsdist 70d82c0
.br
cvsdist 70d82c0
.ns
cvsdist 70d82c0
.TP
cvsdist 70d82c0
.B \-\-merge
cvsdist 70d82c0
Apply the edit script to the first file and send the result to standard
cvsdist 70d82c0
output.  Unlike piping the output from
cvsdist 70d82c0
.I diff3
cvsdist 70d82c0
to
cvsdist 70d82c0
.IR ed ,
cvsdist 70d82c0
this
cvsdist 70d82c0
works even for binary files and incomplete lines.
cvsdist 70d82c0
.B \-A
cvsdist 70d82c0
is assumed
cvsdist 70d82c0
if no edit script option is specified.
cvsdist 70d82c0
.TP
cvsdist 70d82c0
.B \-\-overlap\-only
cvsdist 70d82c0
Like
cvsdist 70d82c0
.BR \-e ,
cvsdist 70d82c0
except output only the overlapping changes.
cvsdist 70d82c0
.TP
cvsdist 70d82c0
.B \-\-show\-all
cvsdist 70d82c0
Incorporate all unmerged changes from
cvsdist 70d82c0
.I older
cvsdist 70d82c0
to
cvsdist 70d82c0
.I yours
cvsdist 70d82c0
into
cvsdist 70d82c0
.IR mine ,
cvsdist 70d82c0
surrounding all overlapping changes with bracket lines.
cvsdist 70d82c0
.TP
cvsdist 70d82c0
.B \-\-show\-overlap
cvsdist 70d82c0
Like
cvsdist 70d82c0
.BR \-e ,
cvsdist 70d82c0
except bracket lines from overlapping changes' first
cvsdist 70d82c0
and third files.
cvsdist 70d82c0
.TP
cvsdist 70d82c0
.B \-T
cvsdist 70d82c0
Output a tab rather than two spaces before the text of a line in normal format.
cvsdist 70d82c0
This causes the alignment of tabs in the line to look normal.
cvsdist 70d82c0
.TP
cvsdist 70d82c0
.B \-\-text
cvsdist 70d82c0
Treat all files as text and compare them line-by-line, even if they
cvsdist 70d82c0
do not appear to be text.
cvsdist 70d82c0
.TP
cvsdist 70d82c0
.B \-v
cvsdist 70d82c0
.br
cvsdist 70d82c0
.ns
cvsdist 70d82c0
.TP
cvsdist 70d82c0
.B \-\-version
cvsdist 70d82c0
Output the version number of
cvsdist 70d82c0
.IR diff3 .
cvsdist 70d82c0
.TP
cvsdist 70d82c0
.B \-x
cvsdist 70d82c0
Like
cvsdist 70d82c0
.BR \-e ,
cvsdist 70d82c0
except output only the overlapping changes.
cvsdist 70d82c0
.TP
cvsdist 70d82c0
.B \-X
cvsdist 70d82c0
Like
cvsdist 70d82c0
.BR \-E ,
cvsdist 70d82c0
except output only the overlapping changes.
cvsdist 70d82c0
In other words, like
cvsdist 70d82c0
.BR \-x ,
cvsdist 70d82c0
except bracket changes as in
cvsdist 70d82c0
.BR \-E .
cvsdist 70d82c0
.TP
cvsdist 70d82c0
.B \-3
cvsdist 70d82c0
Like
cvsdist 70d82c0
.BR \-e ,
cvsdist 70d82c0
except output only the nonoverlapping changes.
cvsdist 70d82c0
.SH SEE ALSO
cvsdist 70d82c0
cmp(1), comm(1), diff(1), ed(1), patch(1), sdiff(1).
cvsdist 70d82c0
.SH DIAGNOSTICS
cvsdist 70d82c0
An exit status of 0 means
cvsdist 70d82c0
.I diff3
cvsdist 70d82c0
was successful, 1 means some
cvsdist 70d82c0
conflicts were found, and 2 means trouble.