Conflicts

An important part of working with others is disagreeing. On text files (such as source code), work can sometimes be split beforehand in such a way that disagreements on a single line in a file never occurs.

However, most creative teams don't have everything planned in advance, and their members often improve each other's code. This might result in conflicts.

In Pijul, there are two kinds of conflicts inside a file:

  • When two different authors add lines at the same position in a file, and it is impossible to tell which comes first in the file.

  • When one author adds a line in a block of text or code, while another author deletes that block.

Conflicts can also occur between files:

  • When authors give the same name to two different files.

  • Or when they rename the same file to two different names.

One of the main features of Pijul is that its internal representation of repositories models conflicts. Patches can be applied to a conflicting repository, leaving the conflict resolution for later.