grep-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

grep branch, master, updated. v2.20-48-g225362a


From: Paul Eggert
Subject: grep branch, master, updated. v2.20-48-g225362a
Date: Fri, 26 Sep 2014 08:06:29 +0000

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  225362ac3967a6ca6343958d7ad395a3dee1b63c (commit)
       via  aaefbfa486df2587e25c8b59d1cca5f2092e7c7a (commit)
      from  f6de00f6cec3831b8f334de7dbd1b59115627457 (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=225362ac3967a6ca6343958d7ad395a3dee1b63c


commit 225362ac3967a6ca6343958d7ad395a3dee1b63c
Author: Paul Eggert <address@hidden>
Date:   Thu Sep 25 17:14:56 2014 -0700

    grep: don't check extensively for invalid prefix bytes unless -P
    
    Problem reported by Jim Meyering in: http://bugs.gnu.org/18454#56
    * src/grep.c (grep): After the first buffer is checked, leave the
    file-type checker in TEXTBIN_UNKNOWN state only when -P is used.
    Only the -P matcher has performance problems with checking binary
    data that make it worthwhile to check every prefix input byte so
    the -P matcher's TEXTBIN_UNKNOWN optimizations can come into play.
    Other matchers can simply check the data directly, and using
    TEXTBIN_UNKNOWN with them slows 'grep' down for no benefit.

diff --git a/src/grep.c b/src/grep.c
index 1e5d0fa..046f17f 100644
--- a/src/grep.c
+++ b/src/grep.c
@@ -1298,6 +1298,8 @@ grep (int fd, struct stat const *st)
           nul_zapper = eol;
           skip_nuls = skip_empty_lines;
         }
+      else if (execute != Pexecute)
+        textbin = TEXTBIN_TEXT;
     }
 
   for (;;)

http://git.savannah.gnu.org/cgit/grep.git/commit/?id=aaefbfa486df2587e25c8b59d1cca5f2092e7c7a


commit 225362ac3967a6ca6343958d7ad395a3dee1b63c
Author: Paul Eggert <address@hidden>
Date:   Thu Sep 25 17:14:56 2014 -0700

    grep: don't check extensively for invalid prefix bytes unless -P
    
    Problem reported by Jim Meyering in: http://bugs.gnu.org/18454#56
    * src/grep.c (grep): After the first buffer is checked, leave the
    file-type checker in TEXTBIN_UNKNOWN state only when -P is used.
    Only the -P matcher has performance problems with checking binary
    data that make it worthwhile to check every prefix input byte so
    the -P matcher's TEXTBIN_UNKNOWN optimizations can come into play.
    Other matchers can simply check the data directly, and using
    TEXTBIN_UNKNOWN with them slows 'grep' down for no benefit.

diff --git a/src/grep.c b/src/grep.c
index 1e5d0fa..046f17f 100644
--- a/src/grep.c
+++ b/src/grep.c
@@ -1298,6 +1298,8 @@ grep (int fd, struct stat const *st)
           nul_zapper = eol;
           skip_nuls = skip_empty_lines;
         }
+      else if (execute != Pexecute)
+        textbin = TEXTBIN_TEXT;
     }
 
   for (;;)

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

Summary of changes:
 src/grep.c |   95 +++++++++++++++++++++++++++++++++++++++++++++++++-----------
 1 files changed, 78 insertions(+), 17 deletions(-)


hooks/post-receive
-- 
grep



reply via email to

[Prev in Thread] Current Thread [Next in Thread]