1DIFF3(1)                           GNU Tools                          DIFF3(1)
2
3
4

NAME

6       diff3 - find differences between three files
7

SYNOPSIS

9       diff3 [options] mine older yours
10

DESCRIPTION

12       The  diff3  command  compares  three  files and outputs descriptions of
13       their differences.
14
15       The files to compare are mine, older, and yours.  At most one of  these
16       three file names may be -, which tells diff3 to read the standard input
17       for that file.
18
19   Options
20       Below is a summary of all of the options that GNU diff3 accepts.   Mul‐
21       tiple  single letter options (unless they take an argument) can be com‐
22       bined into a single command line argument.
23
24       -a     Treat all files as text and compare them line-by-line,  even  if
25              they do not appear to be text.
26
27       -A     Incorporate all changes from older to yours into mine, surround‐
28              ing all conflicts with bracket lines.
29
30       -B     Old behavior of -A.  Shows non-conflicts.
31
32       -e     Generate an ed script that incorporates  all  the  changes  from
33              older to yours into mine.
34
35       -E     Like  -e,  except  bracket lines from overlapping changes' first
36              and third files.  With -e,  an  overlapping  change  looks  like
37              this:
38
39              <<<<<<< mine
40              lines from mine
41              =======
42              lines from yours
43              >>>>>>> yours
44
45       --ed   Generate  an  ed  script  that incorporates all the changes from
46              older to yours into mine.
47
48       --easy-only
49              Like -e, except output only the nonoverlapping changes.
50
51       -i     Generate w and q commands at the end of the ed script for System
52              V  compatibility.   This option must be combined with one of the
53              -AeExX3 options, and may not be combined with -m.
54
55       --initial-tab
56              Output a tab rather than two spaces before the text of a line in
57              normal format.  This causes the alignment of tabs in the line to
58              look normal.
59
60       -L label
61       --label=label
62              Use the label label for the brackets output by the -A, -E and -X
63              options.   This  option  may be given up to three times, one for
64              each input file.  The default labels are the names of the  input
65              files.   Thus diff3 -L X -L Y -L Z -m A B C acts like diff3 -m A
66              B C , except that the output looks like it came from files named
67              X, Y and Z rather than from files named A, B and C.
68
69       -m
70       --merge
71              Apply  the  edit script to the first file and send the result to
72              standard output.  Unlike piping the output  from  diff3  to  ed,
73              this  works  even  for binary files and incomplete lines.  -A is
74              assumed if no edit script option is specified.
75
76       --overlap-only
77              Like -e, except output only the overlapping changes.
78
79       --show-all
80              Incorporate all unmerged changes from older to yours into  mine,
81              surrounding all overlapping changes with bracket lines.
82
83       --show-overlap
84              Like  -e,  except  bracket lines from overlapping changes' first
85              and third files.
86
87       -T     Output a tab rather than two spaces before the text of a line in
88              normal format.  This causes the alignment of tabs in the line to
89              look normal.
90
91       --text Treat all files as text and compare them line-by-line,  even  if
92              they do not appear to be text.
93
94       -v
95       --version
96              Output the version number of diff3.
97
98       -x     Like -e, except output only the overlapping changes.
99
100       -X     Like  -E,  except output only the overlapping changes.  In other
101              words, like -x, except bracket changes as in -E.
102
103       -3     Like -e, except output only the nonoverlapping changes.
104

SEE ALSO

106       cmp(1), comm(1), diff(1), ed(1), patch(1), sdiff(1).
107

DIAGNOSTICS

109       An exit status of 0 means diff3 was successful, 1 means some  conflicts
110       were found, and 2 means trouble.
111
112
113
114GNU Tools                          22sep1993                          DIFF3(1)
Impressum