Subject: Re: conflict markers in markdown files

From: Junio C Hamano <[email-masked]>
Date: Thu, 28 Oct 2021 12:54:57 -0700

Nicholas Bransby-Williams <[email-masked]> 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=32

so 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.