Is there a name for the syntax of a merge conflict Git uses?

When someone gets a conflict, the conflict is marked in the file as:

<<<<<<< HEAD
    <p>Once she climbed a tree and then forgot how to climb back down again</p>
=======
    <p>Once, forgot where her food bowl was and was hungry all day</p>
>>>>>>> prequel

      

Is there a name for this syntax? This seems to be quite common among VCS.

+3


source to share


2 answers


Git calls this conflict markers

Git automatically adds conflict markers to the affected areas. The conflict area starts with <<<<<<<and ends with → → →>. They are also known as conflict markers. The two conflicting blocks themselves are divided into ======= ..

Mercurial uses similar wording

At this point, what happens depends on how Mercurial is configured (see MergeToolConfiguration). By default, Mercurial inserts a set of markers into files to be merged into your working copy:

Unallocated systems? Subversion uses "confict markers"



Lines with smaller signs, equal signs, and larger signs are conflict markers and are not part of the actual data in the conflict.

The grandfather of all, CVS, also calls them conflict sections

There are one or more conflict sections within the conflict file. Each of them begins with "<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<" ======= ", and then another conflicting version and then "→ → →>".

It seems that "conflict markers" are the usual way to refer to them. Some of these documents are official and some are made by third parties, but they all use similar wording.

+4


source


In addition to the accepted answer: these markers are also used by the diff3 tool, hence this particular syntax is sometimes referred to as "diff3 conflict markers".



0


source







All Articles