[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
grep branch, master, updated. v3.7-38-gaf79b17
From: |
Paul Eggert |
Subject: |
grep branch, master, updated. v3.7-38-gaf79b17 |
Date: |
Sun, 21 Nov 2021 01:55:57 -0500 (EST) |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "grep".
The branch, master has been updated
via af79b17356f2edeca2908c14d922a24f659d4a96 (commit)
via 56762bfda567ac2f96ab2f88e8117b5602bccddb (commit)
from 7651f7b8325761c5aa4a4412e2b1cfc5de531408 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/grep.git/commit/?id=af79b17356f2edeca2908c14d922a24f659d4a96
commit af79b17356f2edeca2908c14d922a24f659d4a96
Author: Paul Eggert <eggert@cs.ucla.edu>
Date: Sat Nov 20 22:53:55 2021 -0800
grep: -s does not suppress âbinary file matchesâ
* src/grep.c (grep): Implement this.
* tests/binary-file-matches: Add regression test.
diff --git a/NEWS b/NEWS
index 2f63071..5015580 100644
--- a/NEWS
+++ b/NEWS
@@ -11,6 +11,11 @@ GNU grep NEWS -*- outline
-*-
release 2.5.3 (2007), now warn that they are obsolescent and should
be replaced by grep -E and grep -F.
+** Bug fixes
+
+ The -s option no longer suppresses "binary file matches" messages.
+ [Bug#51860 introduced in grep 3.5]
+
* Noteworthy changes in release 3.7 (2021-08-14) [stable]
diff --git a/src/grep.c b/src/grep.c
index a55194c..19dff43 100644
--- a/src/grep.c
+++ b/src/grep.c
@@ -1646,7 +1646,7 @@ grep (int fd, struct stat const *st, bool *ineof)
finish_grep:
done_on_match = done_on_match_0;
out_quiet = out_quiet_0;
- if (binary_files == BINARY_BINARY_FILES && ! (out_quiet | suppress_errors)
+ if (binary_files == BINARY_BINARY_FILES && !out_quiet
&& (encoding_error_output
|| (0 <= nlines_first_null && nlines_first_null < nlines)))
error (0, 0, _("%s: binary file matches"), input_filename ());
diff --git a/tests/binary-file-matches b/tests/binary-file-matches
index 7fc4a11..8fea071 100755
--- a/tests/binary-file-matches
+++ b/tests/binary-file-matches
@@ -14,8 +14,10 @@ fail=0
echo "grep: (standard input): binary file matches" > exp \
|| framework_failure_
-printf 'a\0' | grep a > out 2> err || fail=1
-compare /dev/null out || fail=1
-compare exp err || fail=1
+for option in '' -s; do
+ printf 'a\0' | grep $option a > out 2> err || fail=1
+ compare /dev/null out || fail=1
+ compare exp err || fail=1
+done
Exit $fail
http://git.savannah.gnu.org/cgit/grep.git/commit/?id=56762bfda567ac2f96ab2f88e8117b5602bccddb
commit af79b17356f2edeca2908c14d922a24f659d4a96
Author: Paul Eggert <eggert@cs.ucla.edu>
Date: Sat Nov 20 22:53:55 2021 -0800
grep: -s does not suppress âbinary file matchesâ
* src/grep.c (grep): Implement this.
* tests/binary-file-matches: Add regression test.
diff --git a/NEWS b/NEWS
index 2f63071..5015580 100644
--- a/NEWS
+++ b/NEWS
@@ -11,6 +11,11 @@ GNU grep NEWS -*- outline
-*-
release 2.5.3 (2007), now warn that they are obsolescent and should
be replaced by grep -E and grep -F.
+** Bug fixes
+
+ The -s option no longer suppresses "binary file matches" messages.
+ [Bug#51860 introduced in grep 3.5]
+
* Noteworthy changes in release 3.7 (2021-08-14) [stable]
diff --git a/src/grep.c b/src/grep.c
index a55194c..19dff43 100644
--- a/src/grep.c
+++ b/src/grep.c
@@ -1646,7 +1646,7 @@ grep (int fd, struct stat const *st, bool *ineof)
finish_grep:
done_on_match = done_on_match_0;
out_quiet = out_quiet_0;
- if (binary_files == BINARY_BINARY_FILES && ! (out_quiet | suppress_errors)
+ if (binary_files == BINARY_BINARY_FILES && !out_quiet
&& (encoding_error_output
|| (0 <= nlines_first_null && nlines_first_null < nlines)))
error (0, 0, _("%s: binary file matches"), input_filename ());
diff --git a/tests/binary-file-matches b/tests/binary-file-matches
index 7fc4a11..8fea071 100755
--- a/tests/binary-file-matches
+++ b/tests/binary-file-matches
@@ -14,8 +14,10 @@ fail=0
echo "grep: (standard input): binary file matches" > exp \
|| framework_failure_
-printf 'a\0' | grep a > out 2> err || fail=1
-compare /dev/null out || fail=1
-compare exp err || fail=1
+for option in '' -s; do
+ printf 'a\0' | grep $option a > out 2> err || fail=1
+ compare /dev/null out || fail=1
+ compare exp err || fail=1
+done
Exit $fail
-----------------------------------------------------------------------
Summary of changes:
NEWS | 5 +++++
doc/grep.in.1 | 2 +-
doc/grep.texi | 2 +-
src/grep.c | 2 +-
tests/binary-file-matches | 8 +++++---
5 files changed, 13 insertions(+), 6 deletions(-)
hooks/post-receive
--
grep
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- grep branch, master, updated. v3.7-38-gaf79b17,
Paul Eggert <=