Re: conflict markers in markdown files
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 28, 2021, 19:54 UTC
- Message-ID
- <xmqq5ytgrkku.fsf@gitster.g>
- In-Reply-To
- <CAGyLXMBWyfcBVFDRbYJMk+-RjjNBQDvoDeaBtEPiXpUDDTqfOA@mail.gmail.com>
Nicholas Bransby-Williams <nbransby@gmail.com> writes:
> Would it make sense to add an option to merge-file so merge tools can > specify a custom marker that is statistically much less likely to > clash with the kinds of text files that are typically stored in git > repositories?
Is the conflict-marker-size attribute sufficient? If not, why?
In our documentation, we do need to have literal runs of '<<<', '===', etc. to illustrate and describe the conflict markers, so we have these in .gitattributes at the top-level:
/Documentation/git-merge.txt conflict-marker-size=32
/Documentation/gitk.txt conflict-marker-size=32
/Documentation/user-manual.txt conflict-marker-size=32so that the auto-inserted conflict markers will be very long, instead of just the default (was it 7? I do not remember offhand because I do not have to). Most importantly, these "32" are written by folks who wrote these documentation pages and *knew* that there is no runs of '<', '=', '|' or '>' that are 32 letters long, so it is safe and can be updated to stay safe when the documentation files change.