From 81effe94682dbfed55171468074db85fa661cc21 Mon Sep 17 00:00:00 2001 From: Antonin Delpeuch Date: Wed, 24 Jan 2024 20:09:11 +0000 Subject: merge-ll: expose revision names to custom drivers Custom merge drivers need access to the names of the revisions they are working on, so that the merge conflict markers they introduce can refer to those revisions. The placeholders '%S', '%X' and '%Y' are introduced to this end. Signed-off-by: Antonin Delpeuch Signed-off-by: Junio C Hamano --- Documentation/gitattributes.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'Documentation/gitattributes.txt') diff --git a/Documentation/gitattributes.txt b/Documentation/gitattributes.txt index 201bdf5edb..4338d023d9 100644 --- a/Documentation/gitattributes.txt +++ b/Documentation/gitattributes.txt @@ -1137,11 +1137,11 @@ The `merge.*.name` variable gives the driver a human-readable name. The `merge.*.driver` variable's value is used to construct a -command to run to merge ancestor's version (`%O`), current +command to run to common ancestor's version (`%O`), current version (`%A`) and the other branches' version (`%B`). These three tokens are replaced with the names of temporary files that hold the contents of these versions when the command line is -built. Additionally, %L will be replaced with the conflict marker +built. Additionally, `%L` will be replaced with the conflict marker size (see below). The merge driver is expected to leave the result of the merge in @@ -1159,8 +1159,9 @@ When left unspecified, the driver itself is used for both internal merge and the final merge. The merge driver can learn the pathname in which the merged result -will be stored via placeholder `%P`. - +will be stored via placeholder `%P`. The conflict labels to be used +for the common ancestor, local head and other head can be passed by +using '%S', '%X' and '%Y` respectively. `conflict-marker-size` ^^^^^^^^^^^^^^^^^^^^^^ -- cgit v1.3-5-g9baa