git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* conflict markers in markdown files
@ 2021-10-28 14:00 Nicholas Bransby-Williams
  2021-10-28 15:38 ` Philip Oakley
  2021-10-28 19:54 ` Junio C Hamano
  0 siblings, 2 replies; 9+ messages in thread
From: Nicholas Bransby-Williams @ 2021-10-28 14:00 UTC (permalink / raw)
  To: git

Isn't it quite unfortunate that markdown chose setext-style headers by
“underlining” with equal signs (=) meaning if a header is 7 characters
long it's going to clash with the git conflicts markers (example
below).

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?

cat ./ours.md
A Second Level Header
---------------------
Ours
=======
Its ours
The quick brown fox jumped over the lazy
dog's back.

cat ./base.md
A Second Level Header
---------------------
The quick brown fox jumped over the lazy
dog's back.

cat ./theirs.md
A Second Level Header
---------------------
Theirs
=======
Its theirs
The quick brown fox jumped over the lazy
dog's back.

git merge-file -p ./ours.md ./base.md ./theirs.md
A Second Level Header
---------------------
<<<<<<< ./ours.md
Ours
=======
Its ours
=======
Theirs
=======
Its theirs
>>>>>>> ./theirs.md
The quick brown fox jumped over the lazy
dog's back.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-10-29  5:08 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-28 14:00 conflict markers in markdown files Nicholas Bransby-Williams
2021-10-28 15:38 ` Philip Oakley
2021-10-28 19:54 ` Junio C Hamano
2021-10-28 20:33   ` Nicholas Bransby-Williams
2021-10-28 22:28     ` Junio C Hamano
2021-10-28 22:49       ` Nicholas Bransby-Williams
2021-10-28 23:11         ` Junio C Hamano
2021-10-28 23:25           ` rsbecker
2021-10-29  5:08             ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).