Subject: grep-2.21 released [stable]

From: Jim Meyering <[email-masked]>
Date: Sun, 23 Nov 2014 14:19:55 -0800

This is to announce grep-2.21, a stable release.

There have been 94 commits by 3 people in the 25 weeks since 2.20.

See the NEWS below for a brief summary.

Thanks to everyone who has contributed!
The following people contributed changes to this release:

  Jim Meyering (26)
  Norihiro Tanaka (17)
  Paul Eggert (51)

Jim [on behalf of the grep maintainers]
==================================================================

Here is the GNU grep home page:
    http://gnu.org/s/grep/

For a summary of changes and contributors, see:
  http://git.sv.gnu.org/gitweb/?p=grep.git;a=shortlog;h=v2.21
or run this command from a git-cloned grep directory:
  git shortlog v2.20..v2.21

To summarize the 123 gnulib-related changes, run these commands
from a git-cloned grep directory:
  git checkout v2.21
  git submodule summary v2.20

Here are the compressed sources and a GPG detached signature[*]:
  http://ftp.gnu.org/gnu/grep/grep-2.21.tar.xz
  http://ftp.gnu.org/gnu/grep/grep-2.21.tar.xz.sig

Use a mirror for higher download bandwidth:
  http://ftpmirror.gnu.org/grep/grep-2.21.tar.xz
  http://ftpmirror.gnu.org/grep/grep-2.21.tar.xz.sig

[*] Use a .sig file to verify that the corresponding file (without the
.sig suffix) is intact.  First, be sure to download both the .sig file
and the corresponding tarball.  Then, run a command like this:

  gpg --verify grep-2.21.tar.xz.sig

If that command fails because you don't have the required public key,
then run this command to import it:

  gpg --keyserver keys.gnupg.net --recv-keys 7FD9FCCB000BEEEE

and rerun the 'gpg --verify' command.

This release was bootstrapped with the following tools:
  Autoconf 2.69.117-1717
  Automake 1.99a
  Gnulib v0.1-262-g46d015f

==================================================================
NEWS

* Noteworthy changes in release 2.21 (2014-11-23) [stable]

** Improvements

  Performance has been greatly improved for searching files containing
  holes, on platforms where lseek's SEEK_DATA flag works efficiently.

  Performance has improved for rejecting data that cannot match even
  the first part of a nontrivial pattern.

  Performance has improved for very long strings in patterns.

  If a file contains data improperly encoded for the current locale,
  and this is discovered before any of the file's contents are output,
  grep now treats the file as binary.

  grep -P no longer reports an error and exits when given invalid UTF-8 data.
  Instead, it considers the data to be non-matching.

** Bug fixes

  grep no longer mishandles patterns that contain \w or \W in multibyte
  locales.

  grep would fail to count newlines internally when operating in non-UTF8
  multibyte locales, leading it to print potentially many lines that did
  not match.  E.g., the command, "seq 10 | env LC_ALL=zh_CN src/grep -n .."
  would print this:
  1:1
  2
  3
  4
  5
  6
  7
  8
  9
  10
  implying that the match, "10" was on line 1.
  [bug introduced in grep-2.19]

  grep -F -x -o no longer prints an extra newline for each match.
  [bug introduced in grep-2.19]

  grep in a non-UTF8 multibyte locale could mistakenly match in the middle
  of a multibyte character when using a '^'-anchored alternate in a pattern,
  leading it to print non-matching lines.  [bug present since "the beginning"]

  grep -F Y no longer fails to match in non-UTF8 multibyte locales like
  Shift-JIS, when the input contains a 2-byte character, XY, followed by
  the single-byte search pattern, Y.  grep would find the first, middle-
  of-multibyte matching "Y", and then mistakenly advance an internal
  pointer one byte too far, skipping over the target "Y" just after that.
  [bug introduced in grep-2.19]

  grep -E rejected unmatched ')', instead of treating it like '\)'.
  [bug present since "the beginning"]

  On NetBSD, grep -r no longer reports "Inappropriate file type or format"
  when refusing to follow a symbolic link.
  [bug introduced in grep-2.12]

** Changes in behavior

  The GREP_OPTIONS environment variable is now obsolescent, and grep
  now warns if it is used.  Please use an alias or script instead.

  In locales with multibyte character encodings other than UTF-8,
  grep -P now reports an error and exits instead of misbehaving.

  When searching binary data, grep now may treat non-text bytes as
  line terminators.  This can boost performance significantly.

  grep -z no longer automatically treats the byte '\200' as binary data.

also posted as:
  https://savannah.gnu.org/forum/forum.php?forum_id=8152