1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 08:34:57 +00:00

diff: Remove "Hunk:" text from output

While this is a useful piece of information it means that diff is
producing hunks that are not of a valid normal diff format. This breaks
the ability to redirect the output of diff to a file to generate a
patch.
This commit is contained in:
Shannon Booth 2023-06-21 18:40:32 +12:00 committed by Andreas Kling
parent 331f6a9e60
commit 312de21498

View file

@ -54,7 +54,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
if (num_added > 1)
sb.appendff(",{}", target_start + num_added - 1);
outln("Hunk: {}", sb.to_deprecated_string());
outln("{}", sb.to_deprecated_string());
for (auto const& line : hunk.removed_lines) {
if (color_output)
outln("\033[31;1m< {}\033[0m", line);