Skip to content

Commit

Permalink
docs: explain long conflict markers
Browse files Browse the repository at this point in the history
  • Loading branch information
scott2000 committed Dec 26, 2024
1 parent e5361c6 commit 0dbcdf7
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions docs/conflicts.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,3 +164,23 @@ ORANGE
This conflict marker style only supports 2-sided conflicts though, so it falls
back to the similar "snapshot" conflict markers if there are more than 2 sides
to the conflict.

## Long conflict markers

Some files may contain lines which could be confused for conflict markers. For
instance, a line could start with `=======`, which looks like a Git-style
conflict marker. To ensure that it's always unambiguous which lines are conflict
markers and which are just part of the file contents, `jj` sometimes uses
conflict markers which are longer than normal:

```
<<<<<<<<<<<<<<< Conflict 1 of 1
%%%%%%%%%%%%%%% Changes from base to side #1
-Heading
+HEADING
=======
+++++++++++++++ Contents of side #2
New Heading
===========
>>>>>>>>>>>>>>> Conflict 1 of 1 ends
```

0 comments on commit 0dbcdf7

Please sign in to comment.