This change allows to identify binary files in recursive or
unified diffs, with the same output as BSD and GNU diff.
---
 editors/diff.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/editors/diff.c b/editors/diff.c
index 6f4ed9712..68e17e0e6 100644
--- a/editors/diff.c
+++ b/editors/diff.c
@@ -784,8 +784,10 @@ static void print_status(int status, char *path[2])
 {
        switch (status) {
        case STATUS_BINARY:
+                printf("Binary files %s and %s differ\n", path[0], path[1]);
+                break;
        case STATUS_DIFFER:
-               if ((option_mask32 & FLAG(q)) || status == STATUS_BINARY)
+               if (option_mask32 & FLAG(q))
                        printf("Files %s and %s differ\n", path[0], path[1]);
                break;
        case STATUS_SAME:
-- 
2.52.0

_______________________________________________
busybox mailing list
[email protected]
https://lists.busybox.net/mailman/listinfo/busybox

Reply via email to