ok/jj
1
0
Fork 0
forked from mirrors/jj

conflicts: add newline after conflict marker lines

Merging is currently done with line-level granularity, so it makes
sense to have newlines after the markers. That makes them easier to
edit out when resolving conflicts.
This commit is contained in:
Martin von Zweigbergk 2021-04-24 13:42:42 -07:00
parent f9460e5c52
commit c6f6498cc9

View file

@ -77,13 +77,13 @@ pub fn materialize_conflict(
file.write_all(&contents).unwrap();
}
files::MergeHunk::Conflict { base, left, right } => {
file.write_all(b"<<<<<<<").unwrap();
file.write_all(b"<<<<<<<\n").unwrap();
file.write_all(&left).unwrap();
file.write_all(b"|||||||").unwrap();
file.write_all(b"|||||||\n").unwrap();
file.write_all(&base).unwrap();
file.write_all(b"=======").unwrap();
file.write_all(b"=======\n").unwrap();
file.write_all(&right).unwrap();
file.write_all(b">>>>>>>").unwrap();
file.write_all(b">>>>>>>\n").unwrap();
}
}
}