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 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210
|
.TH DIFF3 1 "22sep1993" "GNU Tools" "GNU Tools"
.SH NAME
diff3 \- find differences between three files
.SH SYNOPSIS
.B diff3
[options] mine older yours
.SH DESCRIPTION
The
.I diff3
command compares three files and outputs descriptions
of their differences.
The files to compare are
.IR mine ,
.IR older ,
and
.IR yours .
At most one of these three file names may be
.BR \- ,
which tells
.I diff3
to read the standard input for that file.
.SS Options
Below is a summary of all of the options that GNU
.I diff3
accepts. Multiple single letter options (unless they take an argument)
can be combined into a single command line argument.
.TP
.B \-a
Treat all files as text and compare them line-by-line, even if they
do not appear to be text.
.TP
.B \-A
Incorporate all changes from
.I older
to
.I yours
into
.IR mine ,
surrounding all conflicts with bracket lines.
.TP
.B \-B
Old behavior of -A. Shows non-conflicts.
.TP
.B \-e
Generate an
.I ed
script that incorporates all the changes from
.I older
to
.I yours
into
.IR mine .
.TP
.B \-E
Like
.BR \-e ,
except bracket lines from overlapping changes' first
and third files.
With
.BR \-e ,
an overlapping change looks like this:
.sp
.nf
<<<<<<< \fImine\fP
lines from \fImine\fP
=======
lines from \fIyours\fP
>>>>>>> \fIyours\fP
.fi
.TP
.B \-\-ed
Generate an
.I ed
script that incorporates all the changes from
.I older
to
.I yours
into
.IR mine .
.TP
.B \-\-easy\-only
Like
.BR \-e ,
except output only the nonoverlapping changes.
.TP
.B \-i
Generate
.B w
and
.B q
commands at the end of the
.I ed
script for System V compatibility. This option must be combined with
one of the
.B \-AeExX3
options, and may not be combined with
.BR \-m .
.TP
.B \-\-initial\-tab
Output a tab rather than two spaces before the text of a line in normal format.
This causes the alignment of tabs in the line to look normal.
.TP
.BI "\-L " label
.ns
.TP
.BI \-\-label= label
Use the label
.I label
for the brackets output by the
.BR \-A ,
.B \-E
and
.B \-X
options. This option may be given up to three
times, one for each input file. The default labels are the names of
the input files. Thus
.B "diff3 \-L X \-L Y \-L Z \-m A B C"
acts like
.BR "diff3 \-m A B C ,
except that the output looks like it came from
files named
.BR X ,
.B Y
and
.B Z
rather than from files
named
.BR A ,
.B B
and
.BR C .
.TP
.B \-m
.br
.ns
.TP
.B \-\-merge
Apply the edit script to the first file and send the result to standard
output. Unlike piping the output from
.I diff3
to
.IR ed ,
this
works even for binary files and incomplete lines.
.B \-A
is assumed
if no edit script option is specified.
.TP
.B \-\-overlap\-only
Like
.BR \-e ,
except output only the overlapping changes.
.TP
.B \-\-show\-all
Incorporate all unmerged changes from
.I older
to
.I yours
into
.IR mine ,
surrounding all overlapping changes with bracket lines.
.TP
.B \-\-show\-overlap
Like
.BR \-e ,
except bracket lines from overlapping changes' first
and third files.
.TP
.B \-T
Output a tab rather than two spaces before the text of a line in normal format.
This causes the alignment of tabs in the line to look normal.
.TP
.B \-\-text
Treat all files as text and compare them line-by-line, even if they
do not appear to be text.
.TP
.B \-v
.br
.ns
.TP
.B \-\-version
Output the version number of
.IR diff3 .
.TP
.B \-x
Like
.BR \-e ,
except output only the overlapping changes.
.TP
.B \-X
Like
.BR \-E ,
except output only the overlapping changes.
In other words, like
.BR \-x ,
except bracket changes as in
.BR \-E .
.TP
.B \-3
Like
.BR \-e ,
except output only the nonoverlapping changes.
.SH SEE ALSO
cmp(1), comm(1), diff(1), ed(1), patch(1), sdiff(1).
.SH DIAGNOSTICS
An exit status of 0 means
.I diff3
was successful, 1 means some
conflicts were found, and 2 means trouble.
|