From 312de21498c6d1a96eea7c2bd3d67a278141eb0b Mon Sep 17 00:00:00 2001 From: Shannon Booth Date: Wed, 21 Jun 2023 18:40:32 +1200 Subject: [PATCH] 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. --- Userland/Utilities/diff.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Utilities/diff.cpp b/Userland/Utilities/diff.cpp index 6ba5ae9ef2..df9f67cb08 100644 --- a/Userland/Utilities/diff.cpp +++ b/Userland/Utilities/diff.cpp @@ -54,7 +54,7 @@ ErrorOr 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);