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  2ba6ab34da05d3aebc5e7e3dfaedb1cf3ddc5a73 (commit)
      from  7f4e28a8634e1057b9239683e68ca12dd3ff1581 (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=2ba6ab34da05d3aebc5e7e3dfaedb1cf3ddc5a73


commit 2ba6ab34da05d3aebc5e7e3dfaedb1cf3ddc5a73
Author: Paul Eggert <[email protected]>
Date:   Tue Apr 5 23:53:30 2016 -0700

    Give another example of binary file processing
    
    Problem reported by Shlomi Fish
    * doc/grep.texi (File and Directory Selection):
    Document that 'q$' might match 'q' followed by a NUL
    if --binary-files=binary is in effect.

diff --git a/doc/grep.texi b/doc/grep.texi
index 074113b..1d3d5cb 100644
--- a/doc/grep.texi
+++ b/doc/grep.texi
@@ -607,10 +607,6 @@ By default, @var{type} is @samp{binary}, and when 
@command{grep}
 discovers that a file is binary it suppresses any further output, and
 instead outputs either a one-line message saying that a binary file
 matches, or no message if there is no match.
-When processing binary data, @command{grep} may treat non-text bytes
-as line terminators; for example, the pattern @samp{.} (period) might
-not match a null byte, as the null byte might be treated as a line
-terminator even without the @option{-z} (@option{--null-data}) option.
 
 If @var{type} is @samp{without-match},
 when @command{grep} discovers that a file is binary
@@ -621,6 +617,16 @@ If @var{type} is @samp{text},
 @command{grep} processes a binary file as if it were text;
 this is equivalent to the @option{-a} option.
 
+When @var{type} is @samp{binary}, @command{grep} may treat non-text
+bytes as line terminators even without the @option{-z}
+(@option{--null-data}) option.  This means choosing @samp{binary}
+versus @samp{text} can affect whether a pattern matches a file.  For
+example, when @var{type} is @samp{binary} the pattern @samp{q$} might
+match @samp{q} immediately followed by a null byte, even though this
+is not matched when @var{type} is @samp{text}.  Conversely, when
+@var{type} is @samp{binary} the pattern @samp{.} (period) might not
+match a null byte.
+
 @emph{Warning:} @samp{--binary-files=text} might output binary garbage,
 which can have nasty side effects
 if the output is a terminal and

-----------------------------------------------------------------------

Summary of changes:
 doc/grep.texi |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
grep

Reply via email to