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:
parent
f9460e5c52
commit
c6f6498cc9
1 changed files with 4 additions and 4 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue