summaryrefslogtreecommitdiffstats
path: root/upstream/fedora-40/man1/merge.1
blob: a089e660259cf17728675be91e9d7ef7267b76fd (plain)
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
.ds Rv 5.10.1
.ds Dt 2024-01-26
.ds i \&\s-1ISO\s0
.ds r \&\s-1RCS\s0
.ds u \&\s-1UTC\s0
.ds o \*r file
.TH MERGE 1 "\*(Dt" "GNU RCS \*(Rv"
.SH NAME
merge \- three-way file merge
.SH SYNOPSIS
.B merge
[
.I "options"
]
.I "file1 file2 file3"
.SH DESCRIPTION
.B merge
incorporates all changes that lead from
.I file2
to
.I file3
into
.IR file1 .
The result ordinarily goes into
.IR file1 .
.B merge
is useful for combining separate changes to an original.  Suppose
.I file2
is the original, and both
.I file1
and
.I file3
are modifications of
.IR file2 .
Then
.B merge
combines both changes.
.PP
A conflict occurs if both
.I file1
and
.I file3
have changes in a common segment of lines.
If a conflict is found,
.B merge
normally outputs a warning and brackets the conflict with
.B <<<<<<<
and
.B >>>>>>>
lines.
A typical conflict will look like this:
.LP
.RS
.nf
.BI <<<<<<< " file A"
.I "lines in file A"
.B "======="
.I "lines in file B"
.BI >>>>>>> " file B"
.RE
.fi
.LP
If there are conflicts, the user should edit the result and delete one of the
alternatives.
.SH OPTIONS
.TP
.B \-A
Output conflicts using the
.B \-A
style of
.BR diff3 (1),
if supported by
.BR diff3 .
This merges all changes leading from
.I file2
to
.I file3
into
.IR file1 ,
and generates the most verbose output.
.TP
\f3\-E\fP, \f3\-e\fP
These options specify conflict styles that generate less information
than
.BR \-A .
See
.BR diff3 (1)
for details.
The default is
.BR \-E .
With
.BR \-e ,
.B merge
does not warn about conflicts.
.TP
.BI \-L " label"
This option may be given up to three times, and specifies labels
to be used in place of the corresponding file names in conflict reports.
That is,
.B "merge\ \-L\ x\ \-L\ y\ \-L\ z\ a\ b\ c"
generates output that looks like it came from files
.BR x ,
.B y
and
.B z
instead of from files
.BR a ,
.B b
and
.BR c .
.TP
.BI \-p
Send results to standard output instead of overwriting
.IR file1 .
.TP
.BI \-q
Quiet; do not warn about conflicts.
.TP
.BI \-V
Print \*r's version number.
.SH DIAGNOSTICS
Exit status is 0 for no conflicts, 1 for some conflicts, 2 for trouble.
.ds EY 1990, 1991, 1992, 1993, 1994, 1995
.SH IDENTIFICATION
Author: Walter F. Tichy.
.br
Manual Page Revision: \*(Rv; Release Date: \*(Dt.
.br
Copyright \(co 2010-2022 Thien-Thi Nguyen.
.br
Copyright \(co \*(EY Paul Eggert.
.br
Copyright \(co 1982, 1988, 1989 Walter F. Tichy.
.br
.SH "SEE ALSO"
.BR diff3 (1),
.BR diff (1),
.BR rcsmerge (1),
.BR co (1).
.PP
The full documentation for \*r is maintained as a Texinfo manual.
If the
.BR info (1)
and \*r programs are properly installed at your site, the command
.IP
.B info rcs
.PP
should give you access to the complete manual.
Additionally, the \*r homepage:
.IP
.B http://www.gnu.org/software/rcs/
.PP
has news and links to the latest release, development site, etc.
.SH BUGS
It normally does not make sense to merge binary files as if they were text, but
.B merge
tries to do it anyway.
.br