summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2015-06-04 15:10:29 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2015-06-04 15:36:32 -0700
commitef45bb1f8156030446658d5bfb3983ce214a9e16 (patch)
tree7f975d0ae99e0b6d6482e26db55b92db988a557c /Documentation
parentGit 2.2.2 (diff)
downloadtgif-ef45bb1f8156030446658d5bfb3983ce214a9e16.tar.xz
ll-merge: pass the original path to external drivers
The interface to custom low-level merge driver was modeled to be capable of driving programs like "merge" (from the RCS suite) that can produce result solely by looking at three files that hold contents of common ancestor, ours and theirs. The information we feed to the external drivers via the command line placeholders %O, %A, and %B were designed to be purely about contents by giving names of the temporary files that hold these variants without exposing the original pathname. No matter where the result goes, merging the same three variants should produce the same result, contents is the king, that is the Git way. The external driver interface, however, is meant to help people to step outside the Git worldview, and sometimes people want to know the final path that the resulting merged contents would be stored in. Expose this to the external drivers via a new placeholder %P. Requested-by: Andreas Gondek Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/gitattributes.txt5
1 files changed, 4 insertions, 1 deletions
diff --git a/Documentation/gitattributes.txt b/Documentation/gitattributes.txt
index c892ffa5ce..3de7195bc2 100644
--- a/Documentation/gitattributes.txt
+++ b/Documentation/gitattributes.txt
@@ -774,7 +774,7 @@ To define a custom merge driver `filfre`, add a section to your
----------------------------------------------------------------
[merge "filfre"]
name = feel-free merge driver
- driver = filfre %O %A %B
+ driver = filfre %O %A %B %L %P
recursive = binary
----------------------------------------------------------------
@@ -800,6 +800,9 @@ merge between common ancestors, when there are more than one.
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`.
+
`conflict-marker-size`
^^^^^^^^^^^^^^^^^^^^^^