@matheusbsbs / matheus-bagliano / commits / 0e545f7516
Fork 0

Documentation: describe 'union' low-level merge driver

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Junio C Hamano committed Dec 22, 2007 at 23:14 UTC 0e545f75169e2c260dfb4445203c23cafdfc76ef
3 files changed +41 -4
Documentation/git-check-attr.txt
+5
@@ -23,6 +23,11 @@ OPTIONS
23 be treated as an attribute.
24
25
26 +SEE ALSO
27 +--------
28 +gitlink:gitattributes[5].
29 +
30 +
31 Author
32 ------
33 Written by Junio C Hamano <junkio@cox.net>
Documentation/git-merge.txt
+2 -1
@@ -163,7 +163,8 @@ After seeing a conflict, you can do two things:
163
164 SEE ALSO
165 --------
166 -gitlink:git-fmt-merge-msg[1], gitlink:git-pull[1]
166 +gitlink:git-fmt-merge-msg[1], gitlink:git-pull[1],
167 +gitlink:gitattributes[5]
168
169
170 Author
Documentation/gitattributes.txt
+34 -3
@@ -322,12 +322,43 @@ String::
322 requested with "binary".
323
324
325 +Built-in merge drivers
326 +^^^^^^^^^^^^^^^^^^^^^^
327 +
328 +There are a few built-in low-level merge drivers defined that
329 +can be asked for via the `merge` attribute.
330 +
331 +text::
332 +
333 + Usual 3-way file level merge for text files. Conflicted
334 + regions are marked with conflict markers `<<<<<<<`,
335 + `=======` and `>>>>>>>`. The version from your branch
336 + appears before the `=======` marker, and the version
337 + from the merged branch appears after the `=======`
338 + marker.
339 +
340 +binary::
341 +
342 + Keep the version from your branch in the work tree, but
343 + leave the path in the conflicted state for the user to
344 + sort out.
345 +
346 +union::
347 +
348 + Run 3-way file level merge for text files, but take
349 + lines from both versions, instead of leaving conflict
350 + markers. This tends to leave the added lines in the
351 + resulting file in random order and the user should
352 + verify the result. Do not use this if you do not
353 + understand the implications.
354 +
355 +
356 Defining a custom merge driver
357 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
358
328 -The definition of a merge driver is done in `gitconfig` not
329 -`gitattributes` file, so strictly speaking this manual page is a
330 -wrong place to talk about it. However...
359 +The definition of a merge driver is done in the `.git/config`
360 +file, not in the `gitattributes` file, so strictly speaking this
361 +manual page is a wrong place to talk about it. However...
362
363 To define a custom merge driver `filfre`, add a section to your
364 `$GIT_DIR/config` file (or `$HOME/.gitconfig` file) like this: