On 03/01/2016 02:05 AM, Marcello Perathoner wrote:
1) Make the new behaviour an opt-in.
Again, this is arguing over what the default should be. For many users,
the new sort of behavior is better.
2) If you just output
binary line 42 in file x matches
and continue regular output after the next newline, the breakage would
be much more confined.
This sounds like a good suggestion. That is, grep could keep going if
its only problem is an attempt to output encoding errors (as opposed to
reading null bytes, which are a more-reliable indication of binary
data). It would probably be better to output just one "Binary file
matches" line per file, at the end of the other matches, so that it's
more likely to be noticed.
3) Fail in the old documented way of printing only the error message
instead of introducing a new mode of failure that looks like success
and loses the error message in the noise.
I don't understand this suggestion, as it's not an error or an error
message. But since I like (2) better perhaps it doesn't matter.
4) Don't implement this change between minor releases. A breaking
change deserves a major release.
Grep does not have minor releases. Whether to call the next release
"2.24" or "3.0" is primarily a marketing decision, not a technical one.