@matheusbsbs / matheus-bagliano / commits / 4c734803cb
Fork 0

conflict-marker-size: add test and docs

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

Junio C Hamano committed Jan 20, 2010 at 23:49 UTC 4c734803cbd4fac667ba518460c2c0d8725ae3f7
2 files changed +29
Documentation/gitattributes.txt
+17
@@ -525,6 +525,23 @@ When left unspecified, the driver itself is used for both
525 internal merge and the final merge.
526
527
528 +`conflict-marker-size`
529 +^^^^^^^^^^^^^^^^^^^^^^
530 +
531 +This attribute controls the length of conflict markers left in
532 +the work tree file during a conflicted merge. Only setting to
533 +the value to a positive integer has any meaningful effect.
534 +
535 +For example, this line in `.gitattributes` can be used to tell the merge
536 +machinery to leave much longer (instead of the usual 7-character-long)
537 +conflict markers when merging the file `Documentation/git-merge.txt`
538 +results in a conflict.
539 +
540 +------------------------
541 +Documentation/git-merge.txt conflict-marker-size=32
542 +------------------------
543 +
544 +
545 Checking whitespace errors
546 ~~~~~~~~~~~~~~~~~~~~~~~~~~
547
t/t6026-merge-attr.sh
+12
@@ -70,6 +70,18 @@ test_expect_success 'check merge result in working tree' '
70
71 '
72
73 +test_expect_success 'retry the merge with longer context' '
74 + echo text conflict-marker-size=32 >>.gitattributes &&
75 + git checkout -m text &&
76 + sed -ne "/^\([<=>]\)\1\1\1*/{
77 + s/ .*$//
78 + p
79 + }" >actual text &&
80 + grep ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" actual &&
81 + grep "================================" actual &&
82 + grep "<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<" actual
83 +'
84 +
85 cat >./custom-merge <<\EOF
86 #!/bin/sh
87