Re: Bug#570064: diffutils 2.9 breaks dpkg-dev
FYI, here's what I expect to push.
I'll add a test case, too, eventually.
>From 48228e93a472613705dba6c520c7f47fc78756a5 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering@redhat.com>
Date: Thu, 18 Feb 2010 12:59:29 +0100
Subject: [PATCH 1/2] revert 2002 change that removed "Binary " from "files A and B differ"
With this change, "printf '\0'|diff - /dev/null" now prints
"Binary files - and /dev/null differ" once again.
This reverts 2002-06-28 commit a352f0980,
"(briefly_report): Don't say "Binary files differ", ...".
* src/analyze.c (briefly_report): Do include the "Binary " prefix
in the diagnostic, when !brief.
Reported by Andreas Hoenen in http://bugs.debian.org/570064.
---
src/analyze.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/src/analyze.c b/src/analyze.c
index 0a18334..e797248 100644
--- a/src/analyze.c
+++ b/src/analyze.c
@@ -454,9 +454,14 @@ briefly_report (int changes, struct file_data const filevec[])
{
char const *label0 = file_label[0] ? file_label[0] : filevec[0].name;
char const *label1 = file_label[1] ? file_label[1] : filevec[1].name;
- message ("Files %s and %s differ\n", label0, label1);
- if (! brief)
- changes = 2;
+
+ if (brief)
+ message ("Files %s and %s differ\n", label0, label1);
+ else
+ {
+ message ("Binary files %s and %s differ\n", label0, label1);
+ changes = 2;
+ }
}
return changes;
--
1.7.0.233.g05e1a
>From 83b8f2f56b4c89ff02ca4d0d4c130823e659c44f Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering@redhat.com>
Date: Thu, 18 Feb 2010 13:13:24 +0100
Subject: [PATCH 2/2] * NEWS (Changes in behavior): Mention the diagnostic change.
---
NEWS | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/NEWS b/NEWS
index 0e42975..3d0d995 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,12 @@ GNU diffutils NEWS -*- outline -*-
* Noteworthy changes in release ?.? (????-??-??) [?]
+** Changes in behavior
+
+ diff once again reports a difference with the diagnostic
+ "Binary files A and B differ" when at least one of the files
+ appears to be binary.
+
* Noteworthy changes in release 2.9 (2010-02-11) [stable]
--
1.7.0.233.g05e1a
Reply to: