From 0dbcdf72334dd38a6d76e404442d133d6c4ab2bb Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Tue, 24 Dec 2024 11:44:04 -0600 Subject: [PATCH] docs: explain long conflict markers --- docs/conflicts.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/docs/conflicts.md b/docs/conflicts.md index 3d5fbeced..d2573f48e 100644 --- a/docs/conflicts.md +++ b/docs/conflicts.md @@ -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 +```