mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 00:37:35 +00:00
LibDiff: Add support for writing formatted context hunks
There is a little bit more complexity involved here than the other formats. In particular, this is due to the need to determine whether an addition line or removal line is just that, or a 'change'.
This commit is contained in:
parent
4bcf3ea0e1
commit
f02cf2704c
3 changed files with 119 additions and 0 deletions
|
@ -25,4 +25,5 @@ ErrorOr<void> write_unified_header(StringView old_path, StringView new_path, Str
|
|||
|
||||
ErrorOr<void> write_normal(Hunk const& hunk, Stream& stream, ColorOutput color_output = ColorOutput::No);
|
||||
|
||||
ErrorOr<void> write_context(Hunk const& hunk, Stream& stream, ColorOutput color_output = ColorOutput::No);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue