summaryrefslogtreecommitdiffstats
path: root/man1/git-merge-file.1
diff options
context:
space:
mode:
Diffstat (limited to 'man1/git-merge-file.1')
-rw-r--r--man1/git-merge-file.132
1 files changed, 24 insertions, 8 deletions
diff --git a/man1/git-merge-file.1 b/man1/git-merge-file.1
index a6493ca3c..c797b6a23 100644
--- a/man1/git-merge-file.1
+++ b/man1/git-merge-file.1
@@ -2,12 +2,12 @@
.\" Title: git-merge-file
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 2023-11-03
+.\" Date: 2023-11-08
.\" Manual: Git Manual
-.\" Source: Git 2.43.0.rc0.23.g8be77c5de6
+.\" Source: Git 2.43.0.rc1
.\" Language: English
.\"
-.TH "GIT\-MERGE\-FILE" "1" "2023\-11\-03" "Git 2\&.43\&.0\&.rc0\&.23\&.g8" "Git Manual"
+.TH "GIT\-MERGE\-FILE" "1" "2023\-11\-08" "Git 2\&.43\&.0\&.rc1" "Git Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -34,14 +34,14 @@ git-merge-file \- Run a three\-way file merge
.nf
\fIgit merge\-file\fR [\-L <current\-name> [\-L <base\-name> [\-L <other\-name>]]]
[\-\-ours|\-\-theirs|\-\-union] [\-p|\-\-stdout] [\-q|\-\-quiet] [\-\-marker\-size=<n>]
- [\-\-[no\-]diff3] <current\-file> <base\-file> <other\-file>
+ [\-\-[no\-]diff3] [\-\-object\-id] <current> <base> <other>
.fi
.sp
.SH "DESCRIPTION"
.sp
-\fIgit merge\-file\fR incorporates all changes that lead from the \fB<base\-file>\fR to \fB<other\-file>\fR into \fB<current\-file>\fR\&. The result ordinarily goes into \fB<current\-file>\fR\&. \fIgit merge\-file\fR is useful for combining separate changes to an original\&. Suppose \fB<base\-file>\fR is the original, and both \fB<current\-file>\fR and \fB<other\-file>\fR are modifications of \fB<base\-file>\fR, then \fIgit merge\-file\fR combines both changes\&.
+Given three files \fB<current>\fR, \fB<base>\fR and \fB<other>\fR, \fIgit merge\-file\fR incorporates all changes that lead from \fB<base>\fR to \fB<other>\fR into \fB<current>\fR\&. The result ordinarily goes into \fB<current>\fR\&. \fIgit merge\-file\fR is useful for combining separate changes to an original\&. Suppose \fB<base>\fR is the original, and both \fB<current>\fR and \fB<other>\fR are modifications of \fB<base>\fR, then \fIgit merge\-file\fR combines both changes\&.
.sp
-A conflict occurs if both \fB<current\-file>\fR and \fB<other\-file>\fR have changes in a common segment of lines\&. If a conflict is found, \fIgit merge\-file\fR normally outputs a warning and brackets the conflict with lines containing <<<<<<< and >>>>>>> markers\&. A typical conflict will look like this:
+A conflict occurs if both \fB<current>\fR and \fB<other>\fR have changes in a common segment of lines\&. If a conflict is found, \fIgit merge\-file\fR normally outputs a warning and brackets the conflict with lines containing <<<<<<< and >>>>>>> markers\&. A typical conflict will look like this:
.sp
.if n \{\
.RS 4
@@ -57,13 +57,24 @@ lines in file B
.RE
.\}
.sp
-If there are conflicts, the user should edit the result and delete one of the alternatives\&. When \fB\-\-ours\fR, \fB\-\-theirs\fR, or \fB\-\-union\fR option is in effect, however, these conflicts are resolved favouring lines from \fB<current\-file>\fR, lines from \fB<other\-file>\fR, or lines from both respectively\&. The length of the conflict markers can be given with the \fB\-\-marker\-size\fR option\&.
+If there are conflicts, the user should edit the result and delete one of the alternatives\&. When \fB\-\-ours\fR, \fB\-\-theirs\fR, or \fB\-\-union\fR option is in effect, however, these conflicts are resolved favouring lines from \fB<current>\fR, lines from \fB<other>\fR, or lines from both respectively\&. The length of the conflict markers can be given with the \fB\-\-marker\-size\fR option\&.
+.sp
+If \fB\-\-object\-id\fR is specified, exactly the same behavior occurs, except that instead of specifying what to merge as files, it is specified as a list of object IDs referring to blobs\&.
.sp
The exit value of this program is negative on error, and the number of conflicts otherwise (truncated to 127 if there are more than that many conflicts)\&. If the merge was clean, the exit value is 0\&.
.sp
\fIgit merge\-file\fR is designed to be a minimal clone of RCS \fImerge\fR; that is, it implements all of RCS \fImerge\fR\*(Aqs functionality which is needed by \fBgit\fR(1)\&.
.SH "OPTIONS"
.PP
+\-\-object\-id
+.RS 4
+Specify the contents to merge as blobs in the current repository instead of files\&. In this case, the operation must take place within a valid repository\&.
+.sp
+If the
+\fB\-p\fR
+option is specified, the merged file (including conflicts, if any) goes to standard output as normal; otherwise, the merged file is written to the object store and the object ID of its blob is written to standard output\&.
+.RE
+.PP
\-L <label>
.RS 4
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,
@@ -74,7 +85,7 @@ generates output that looks like it came from files x, y and z instead of from f
\-p
.RS 4
Send results to standard output instead of overwriting
-\fB<current\-file>\fR\&.
+\fB<current>\fR\&.
.RE
.PP
\-q
@@ -114,6 +125,11 @@ instead of
and
\fBtmp/c345\fR\&.
.RE
+.PP
+\fBgit merge\-file \-p \-\-object\-id abc1234 def567 890abcd\fR
+.RS 4
+combines the changes of the blob abc1234 and 890abcd since def567, tries to merge them and writes the result to standard output
+.RE
.SH "GIT"
.sp
Part of the \fBgit\fR(1) suite