1 | .de Id |
---|
2 | .ds Rv \\$3 |
---|
3 | .ds Dt \\$4 |
---|
4 | .. |
---|
5 | .Id $Id: merge.1,v 1.1.1.1 1996-10-04 05:52:42 ghudson Exp $ |
---|
6 | .TH MERGE 1 \*(Dt GNU |
---|
7 | .SH NAME |
---|
8 | merge \- three-way file merge |
---|
9 | .SH SYNOPSIS |
---|
10 | .B merge |
---|
11 | [ |
---|
12 | .I "options" |
---|
13 | ] |
---|
14 | .I "file1 file2 file3" |
---|
15 | .SH DESCRIPTION |
---|
16 | .B merge |
---|
17 | incorporates all changes that lead from |
---|
18 | .I file2 |
---|
19 | to |
---|
20 | .I file3 |
---|
21 | into |
---|
22 | .IR file1 . |
---|
23 | The result ordinarily goes into |
---|
24 | .IR file1 . |
---|
25 | .B merge |
---|
26 | is useful for combining separate changes to an original. Suppose |
---|
27 | .I file2 |
---|
28 | is the original, and both |
---|
29 | .I file1 |
---|
30 | and |
---|
31 | .I file3 |
---|
32 | are modifications of |
---|
33 | .IR file2 . |
---|
34 | Then |
---|
35 | .B merge |
---|
36 | combines both changes. |
---|
37 | .PP |
---|
38 | A conflict occurs if both |
---|
39 | .I file1 |
---|
40 | and |
---|
41 | .I file3 |
---|
42 | have changes in a common segment of lines. |
---|
43 | If a conflict is found, |
---|
44 | .B merge |
---|
45 | normally outputs a warning and brackets the conflict with |
---|
46 | .B <<<<<<< |
---|
47 | and |
---|
48 | .B >>>>>>> |
---|
49 | lines. |
---|
50 | A typical conflict will look like this: |
---|
51 | .LP |
---|
52 | .RS |
---|
53 | .nf |
---|
54 | .BI <<<<<<< " file A" |
---|
55 | .I "lines in file A" |
---|
56 | .B "=======" |
---|
57 | .I "lines in file B" |
---|
58 | .BI >>>>>>> " file B" |
---|
59 | .RE |
---|
60 | .fi |
---|
61 | .LP |
---|
62 | If there are conflicts, the user should edit the result and delete one of the |
---|
63 | alternatives. |
---|
64 | .SH OPTIONS |
---|
65 | .TP |
---|
66 | .B \-A |
---|
67 | Output conflicts using the |
---|
68 | .B \-A |
---|
69 | style of |
---|
70 | .BR diff3 (1), |
---|
71 | if supported by |
---|
72 | .BR diff3 . |
---|
73 | This merges all changes leading from |
---|
74 | .I file2 |
---|
75 | to |
---|
76 | .I file3 |
---|
77 | into |
---|
78 | .IR file1 , |
---|
79 | and generates the most verbose output. |
---|
80 | .TP |
---|
81 | \f3\-E\fP, \f3\-e\fP |
---|
82 | These options specify conflict styles that generate less information |
---|
83 | than |
---|
84 | .BR \-A . |
---|
85 | See |
---|
86 | .BR diff3 (1) |
---|
87 | for details. |
---|
88 | The default is |
---|
89 | .BR \-E . |
---|
90 | With |
---|
91 | .BR \-e , |
---|
92 | .B merge |
---|
93 | does not warn about conflicts. |
---|
94 | .TP |
---|
95 | .BI \-L " label" |
---|
96 | This option may be given up to three times, and specifies labels |
---|
97 | to be used in place of the corresponding file names in conflict reports. |
---|
98 | That is, |
---|
99 | .B "merge\ \-L\ x\ \-L\ y\ \-L\ z\ a\ b\ c" |
---|
100 | generates output that looks like it came from files |
---|
101 | .BR x , |
---|
102 | .B y |
---|
103 | and |
---|
104 | .B z |
---|
105 | instead of from files |
---|
106 | .BR a , |
---|
107 | .B b |
---|
108 | and |
---|
109 | .BR c . |
---|
110 | .TP |
---|
111 | .BI \-p |
---|
112 | Send results to standard output instead of overwriting |
---|
113 | .IR file1 . |
---|
114 | .TP |
---|
115 | .BI \-q |
---|
116 | Quiet; do not warn about conflicts. |
---|
117 | .BI \-V |
---|
118 | Print \*r's version number. |
---|
119 | .SH DIAGNOSTICS |
---|
120 | Exit status is 0 for no conflicts, 1 for some conflicts, 2 for trouble. |
---|
121 | .SH IDENTIFICATION |
---|
122 | Author: Walter F. Tichy. |
---|
123 | .br |
---|
124 | Manual Page Revision: \*(Rv; Release Date: \*(Dt. |
---|
125 | .br |
---|
126 | Copyright \(co 1982, 1988, 1989 Walter F. Tichy. |
---|
127 | .br |
---|
128 | Copyright \(co 1990, 1991, 1992, 1993, 1994, 1995 Paul Eggert. |
---|
129 | .SH SEE ALSO |
---|
130 | diff3(1), diff(1), rcsmerge(1), co(1). |
---|
131 | .SH BUGS |
---|
132 | It normally does not make sense to merge binary files as if they were text, but |
---|
133 | .B merge |
---|
134 | tries to do it anyway. |
---|
135 | .br |
---|