Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Apr 2018 08:48:20 -0500
From:      Kyle Evans <kevans@freebsd.org>
To:        Kyle Evans <kevans@freebsd.org>
Cc:        src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org,  svn-src-head@freebsd.org
Subject:   Re: svn commit: r332856 - head/usr.bin/grep
Message-ID:  <CACNAnaE2ZEDaj2y%2BqGxwMubDRZJDfRpofs6RktwB_SK9u=fb3Q@mail.gmail.com>
In-Reply-To: <201804211346.w3LDk7YM056252@repo.freebsd.org>
References:  <201804211346.w3LDk7YM056252@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Apr 21, 2018 at 8:46 AM, Kyle Evans <kevans@freebsd.org> wrote:
> Author: kevans
> Date: Sat Apr 21 13:46:07 2018
> New Revision: 332856
> URL: https://svnweb.freebsd.org/changeset/base/332856
>
> Log:
>   bsdgrep: Fix --include/--exclude ordering issues
>
>   Prior to r332851:
>   * --exclude always win out over --include
>   * --exclude-dir always wins out over --include-dir
>
>   r332851 broke that behavior, resulting in:
>   * First of --exclude, --include wins
>   * First of --exclude-dir, --include-dir wins
>
>   As it turns out, both behaviors are wrong by modern grep standards- the
>   latest rule wins. e.g.:
>
>   `grep --exclude foo --include foo 'thing' foo`
>   foo is included
>
>   `grep --include foo --exclude foo 'thing' foo`
>   foo is excluded
>
>   As tested with GNU grep 3.1.
>
>   This commit makes bsdgrep follow this behavior.
>
>   Reported by:  se
>

Just to be clear, because I don't want to mislead- se's report was
specifically that I broke the previous behavior. Later investigation
found that both behaviors were wrong.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACNAnaE2ZEDaj2y%2BqGxwMubDRZJDfRpofs6RktwB_SK9u=fb3Q>