From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 09 23:58:11 2015 Received: (at submit) by debbugs.gnu.org; 10 Jul 2015 03:58:11 +0000 Received: from localhost ([127.0.0.1]:45706 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZDPRz-0006iv-6t for submit@debbugs.gnu.org; Thu, 09 Jul 2015 23:58:11 -0400 Received: from eggs.gnu.org ([208.118.235.92]:42638) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZDPRw-0006ig-Rp for submit@debbugs.gnu.org; Thu, 09 Jul 2015 23:58:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZDPRq-0005er-I9 for submit@debbugs.gnu.org; Thu, 09 Jul 2015 23:58:03 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:51221) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZDPRq-0005en-EJ for submit@debbugs.gnu.org; Thu, 09 Jul 2015 23:58:02 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56138) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZDPRp-0005V8-Gz for bug-grep@gnu.org; Thu, 09 Jul 2015 23:58:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZDPRo-0005eO-OC for bug-grep@gnu.org; Thu, 09 Jul 2015 23:58:01 -0400 Received: from mail-oi0-x235.google.com ([2607:f8b0:4003:c06::235]:35415) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZDPRo-0005eI-ID for bug-grep@gnu.org; Thu, 09 Jul 2015 23:58:00 -0400 Received: by oihr66 with SMTP id r66so147453853oih.2 for ; Thu, 09 Jul 2015 20:58:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:from:date:message-id:subject:to:content-type; bh=IfWrJQOR9xnKhWaeUlF74sguWPPnI3QVvXwHPwFlmGA=; b=svBVeXToUZlcHmGqGLCds+ahbk/hHDr1CYqUzQrd1PmktBD1CaKX0T2ZFDrmT03NrN 3fkQh7tCV4cF09XAAZjUCQu8k5t5NUrbmVUKpWGsPMEA6ikQQb7mCOWVJL8nxP4QCaKM a9Uc6OeEIOEtT+f0z+wDjVhkZ50LOwj8Fr986jyQ0w/+V3wpuURfXbCba0k69TbOxkJl zzKy30w41tPhLKlRFCNfdcZGUQspkAZBzdxKy4MLarVnxDsdeQs9aCICN3HBVUUDgKtn ZJHyTa1rv1M0HVX/FmRPwU0/c2JCixnP9Vvi/XLaad1C0bICOQnQnd04vwI/8bDpY5RY WAAw== X-Received: by 10.182.87.137 with SMTP id ay9mr17186224obb.68.1436500679955; Thu, 09 Jul 2015 20:57:59 -0700 (PDT) MIME-Version: 1.0 Received: by 10.76.37.134 with HTTP; Thu, 9 Jul 2015 20:57:40 -0700 (PDT) From: Aron Griffis Date: Thu, 9 Jul 2015 23:57:40 -0400 X-Google-Sender-Auth: sLPBoOIGyGJKlhOWWITEQoSFRRU Message-ID: Subject: --exclude-dir matches search dir To: bug-grep@gnu.org Content-Type: multipart/alternative; boundary=089e0111c01abf9d41051a7d601b X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) --089e0111c01abf9d41051a7d601b Content-Type: text/plain; charset=UTF-8 This generates output: $ grep -rl --exclude-dir=usr LINUX /usr/include and this doesn't: $ grep -rl --exclude-dir='usr*' LINUX /usr/include This feels like a bug. My actual use-case is more like the following, but the above seems like a more universal test case. $ grep -rl --exclude-dir='.*' /home/aron/.virtualenvs/pp/src PATT This surprised me by not generating any results. I had expected the exclusion to only affect dirs within the given path, not match on the path itself, but it seems to be aborting because '.*' matches '.virtualenvs'. Is this a bug or just a bad assumption on my part? $ grep --version /usr/bin/grep (GNU grep) 2.21 Thanks, Aron --089e0111c01abf9d41051a7d601b Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
This generate= s output:

$ grep -rl --exclude-dir=3Dusr LINUX= /usr/include

and this doesn't:
<= br>
$ grep -rl= --exclude-dir=3D'usr*' LINUX /usr/include

This feels like a bug. My actual use-case is more like the followin= g, but the above seems like a more universal test case.

$ grep -rl --exclude-dir=3D'.*' /home/aron/.virtualenvs/pp= /src PATT

This surprised me by not generating a= ny results. I had expected the exclusion to only affect dirs within the giv= en path, not match on the path itself, but it seems to be aborting because = '.*' matches '.virtualenvs'.=C2=A0 Is this a bug or just a = bad assumption on my part?

$ grep --versio= n
/usr/bin/grep (GNU grep) 2.21

Thanks,
Aron
--089e0111c01abf9d41051a7d601b-- From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 11 08:30:55 2015 Received: (at control) by debbugs.gnu.org; 11 Jul 2015 12:30:55 +0000 Received: from localhost ([127.0.0.1]:46676 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZDtvj-0001w5-DV for submit@debbugs.gnu.org; Sat, 11 Jul 2015 08:30:55 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:60958) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZDtvh-0001vr-UI for control@debbugs.gnu.org; Sat, 11 Jul 2015 08:30:54 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 297D21608FB for ; Sat, 11 Jul 2015 05:30:48 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id KuGExVUo_ZNa for ; Sat, 11 Jul 2015 05:30:47 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 80BE6160924 for ; Sat, 11 Jul 2015 05:30:47 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id YtB-T836LGGy for ; Sat, 11 Jul 2015 05:30:47 -0700 (PDT) Received: from [192.168.0.11] (cpe-69-76-13-118.natnow.res.rr.com [69.76.13.118]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 4CA7C1608FB for ; Sat, 11 Jul 2015 05:30:47 -0700 (PDT) Message-ID: <55A10C75.7070904@cs.ucla.edu> Date: Sat, 11 Jul 2015 05:30:45 -0700 From: Paul Eggert User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: control@debbugs.gnu.org Subject: merge 21026 21027 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.6 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) merge 21026 21027 thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 13 19:35:29 2015 Received: (at 21027-done) by debbugs.gnu.org; 13 Jul 2015 23:35:29 +0000 Received: from localhost ([127.0.0.1]:48447 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZEnFx-0000LX-4z for submit@debbugs.gnu.org; Mon, 13 Jul 2015 19:35:29 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:56872) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZEnFu-0000LJ-LD for 21027-done@debbugs.gnu.org; Mon, 13 Jul 2015 19:35:27 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 182AD1609A5; Mon, 13 Jul 2015 16:35:21 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id MYTOmyqIq75K; Mon, 13 Jul 2015 16:35:20 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id E7FF9160CB9; Mon, 13 Jul 2015 16:35:19 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id NA0zDrtxxWDV; Mon, 13 Jul 2015 16:35:19 -0700 (PDT) Received: from [192.168.1.9] (pool-100-32-155-148.lsanca.fios.verizon.net [100.32.155.148]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id C7B1B160CB7; Mon, 13 Jul 2015 16:35:19 -0700 (PDT) Message-ID: <55A44B37.4070506@cs.ucla.edu> Date: Mon, 13 Jul 2015 16:35:19 -0700 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Aron Griffis , 21027-done@debbugs.gnu.org Subject: Re: bug#21027: --exclude-dir matches search dir References: In-Reply-To: Content-Type: multipart/mixed; boundary="------------030802080901000601050503" X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: 21027-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.4 (-) This is a multi-part message in MIME format. --------------030802080901000601050503 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Aron Griffis wrote: > This generates output: > > $ grep -rl --exclude-dir=usr LINUX /usr/include > > and this doesn't: > > $ grep -rl --exclude-dir='usr*' LINUX /usr/include > > This feels like a bug. Thanks for reporting that. I installed the attached patch. --------------030802080901000601050503 Content-Type: text/x-diff; name="0001-grep-fix-bug-with-exclude-dir-and-command-line.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0001-grep-fix-bug-with-exclude-dir-and-command-line.patch" >From 3b6896988c4e139115f24a2c6a804dbdb6bd744c Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 13 Jul 2015 16:31:26 -0700 Subject: [PATCH] grep: fix bug with --exclude-dir and command line Reported by Aron Griffis in: http://bugs.gnu.org/21027 * NEWS: Document this. * src/grep.c (grepdirent): Don't check whether the file is skipped when on the command line, as that's the caller's responsibility. (main): Anchor the exclude patterns. * tests/include-exclude: Adjust test case to match fixed behavior. Add some more test cases. --- NEWS | 4 ++++ src/grep.c | 14 ++++++++------ tests/include-exclude | 12 +++++++++++- 3 files changed, 23 insertions(+), 7 deletions(-) diff --git a/NEWS b/NEWS index 35c4aad..47b86ae 100644 --- a/NEWS +++ b/NEWS @@ -22,6 +22,10 @@ GNU grep NEWS -*- outline -*- 'grep -D skip PATTERN FILE' no longer hangs if FILE is a fifo. [bug introduced in grep-2.12] + --exclude and related options are now matched against entire + command-line arguments, not against command-line components. + [bug introduced in grep-2.6] + * Noteworthy changes in release 2.21 (2014-11-23) [stable] diff --git a/src/grep.c b/src/grep.c index a735ea5..d8ea70f 100644 --- a/src/grep.c +++ b/src/grep.c @@ -1482,9 +1482,10 @@ grepdirent (FTS *fts, FTSENT *ent, bool command_line) return true; } - if (skipped_file (ent->fts_name, command_line, - (ent->fts_info == FTS_D || ent->fts_info == FTS_DC - || ent->fts_info == FTS_DNR))) + if (!command_line + && skipped_file (ent->fts_name, false, + (ent->fts_info == FTS_D || ent->fts_info == FTS_DC + || ent->fts_info == FTS_DNR))) { fts_set (fts, ent, FTS_SKIP); return true; @@ -2448,14 +2449,14 @@ main (int argc, char **argv) if (!excluded_patterns) excluded_patterns = new_exclude (); add_exclude (excluded_patterns, optarg, - (EXCLUDE_WILDCARDS + (EXCLUDE_ANCHORED | EXCLUDE_WILDCARDS | (opt == INCLUDE_OPTION ? EXCLUDE_INCLUDE : 0))); break; case EXCLUDE_FROM_OPTION: if (!excluded_patterns) excluded_patterns = new_exclude (); if (add_exclude_file (add_exclude, excluded_patterns, optarg, - EXCLUDE_WILDCARDS, '\n') != 0) + EXCLUDE_ANCHORED | EXCLUDE_WILDCARDS, '\n') != 0) { error (EXIT_TROUBLE, errno, "%s", optarg); } @@ -2465,7 +2466,8 @@ main (int argc, char **argv) if (!excluded_directory_patterns) excluded_directory_patterns = new_exclude (); strip_trailing_slashes (optarg); - add_exclude (excluded_directory_patterns, optarg, EXCLUDE_WILDCARDS); + add_exclude (excluded_directory_patterns, optarg, + EXCLUDE_ANCHORED | EXCLUDE_WILDCARDS); break; case GROUP_SEPARATOR_OPTION: diff --git a/tests/include-exclude b/tests/include-exclude index 55819c5..8b2f5aa 100755 --- a/tests/include-exclude +++ b/tests/include-exclude @@ -14,6 +14,7 @@ printf '%s\n' x/a:aaa x/b:bbb > exp-not-dir || framework_failure_ printf '%s\n' x/a:aaa > exp-a || framework_failure_ printf '%s\n' a:aaa > exp-aa || framework_failure_ printf '%s\n' aaa > exp-aaa || framework_failure_ +printf '%s\n' ./x/a ./x/b ./x/dir/d > exp-dotnames || framework_failure+ grep -r --exclude='a*' . x > out || fail=1 sort out > k && mv k out @@ -51,7 +52,7 @@ grep -r --include='a*' . x > out || fail=1 compare exp-a out || fail=1 # --include (without --recursive) uses different code -grep --directories=skip --include=a --exclude-dir=dir '^aaa$' x/* > out \ +grep --directories=skip --include=x/a --exclude-dir=dir '^aaa$' x/* > out \ || fail=1 compare exp-a out || fail=1 @@ -61,4 +62,13 @@ compare exp-aa out || fail=1 grep --exclude=- '^aaa$' - < x/a > out || fail=1 compare exp-aaa out || fail=1 +for exclude in 'x' 'x*'; do + grep -rl --exclude-dir="$exclude" . x > out + test $? -eq 1 || fail=1 + compare /dev/null out || fail=1 + + grep -rl --exclude-dir="$exclude" . ./x > out || fail=1 + compare exp-dotnames out || fail=1 +done + Exit $fail -- 2.1.0 --------------030802080901000601050503-- From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 17 17:31:55 2015 Received: (at 21027-done) by debbugs.gnu.org; 17 Jul 2015 21:31:55 +0000 Received: from localhost ([127.0.0.1]:52304 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZGDEZ-0003aB-00 for submit@debbugs.gnu.org; Fri, 17 Jul 2015 17:31:55 -0400 Received: from mail-ie0-f170.google.com ([209.85.223.170]:34682) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZGDEW-0003Zx-UI for 21027-done@debbugs.gnu.org; Fri, 17 Jul 2015 17:31:53 -0400 Received: by iebmu5 with SMTP id mu5so85262736ieb.1 for <21027-done@debbugs.gnu.org>; Fri, 17 Jul 2015 14:31:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=wqQhHCBufDy7CVr++6u2Ud5SWUtEKG+bhln/aphsjLg=; b=hZGT0+Zt6AMhGQHe2QTt6uUUWv8adLzNMRM0Nhr3ULhowe8NTZEUYzHR0Vl3+bVDna 3wlf2OksFoqIAPXfRa2kgZvEgO8o3IrZmTxygLcaQnJlQKU/lDyrdUqVpUX52d96uUWd KHqhUhZKsu2bjWAn0YdOWhVZMt4LOUu3ML9i7GHeBTVJegpThkHKAfc8TysVyMJAvqaY p7h91EmuI8g1kjwra/V+CUxVpI9tIc/9/01mK+TxRT/dpCpIPgGYJd+ZBYd8hk0dj+6F xdy6m2FE+MFt8IW6jl5ra0ZV7ArAK4jhvVc6t7OYZ9l7m/wE7Yah/cVaty2DqvUq7UAS N3Ew== X-Received: by 10.107.150.1 with SMTP id y1mr20349567iod.108.1437168707342; Fri, 17 Jul 2015 14:31:47 -0700 (PDT) MIME-Version: 1.0 Received: by 10.36.10.72 with HTTP; Fri, 17 Jul 2015 14:31:27 -0700 (PDT) In-Reply-To: <55A44B37.4070506@cs.ucla.edu> References: <55A44B37.4070506@cs.ucla.edu> From: Jim Meyering Date: Fri, 17 Jul 2015 14:31:27 -0700 X-Google-Sender-Auth: 62r0hT-BDNxGTkXcXIiL_Z0vdLo Message-ID: Subject: Re: bug#21027: --exclude-dir matches search dir To: Paul Eggert , aron@arongriffis.com Content-Type: multipart/mixed; boundary=001a1140ae8a48ca66051b18ea4e X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21027-done Cc: 21027-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --001a1140ae8a48ca66051b18ea4e Content-Type: text/plain; charset=UTF-8 On Mon, Jul 13, 2015 at 4:35 PM, Paul Eggert wrote: > Aron Griffis wrote: >> >> This generates output: >> >> $ grep -rl --exclude-dir=usr LINUX /usr/include >> >> and this doesn't: >> >> $ grep -rl --exclude-dir='usr*' LINUX /usr/include >> >> This feels like a bug. > > Thanks for reporting that. I installed the attached patch. I've pushed this small follow-up patch to fix a false-positive test failure: --001a1140ae8a48ca66051b18ea4e Content-Type: text/x-patch; charset=US-ASCII; name="0001-tests-avoid-FS-dependent-false-positive-failure.patch" Content-Disposition: attachment; filename="0001-tests-avoid-FS-dependent-false-positive-failure.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_ic84jj5h1 RnJvbSBlOWE0Yjc0ZGE1NTNjNTZjY2IyZTI4MWNhZWMzNmEzMTZhYjJkZGMxIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBKaW0gTWV5ZXJpbmcgPG1leWVyaW5nQGZiLmNvbT4KRGF0ZTog RnJpLCAxNyBKdWwgMjAxNSAxNDowMjozNSAtMDcwMApTdWJqZWN0OiBbUEFUQ0hdIHRlc3RzOiBh dm9pZCBGUy1kZXBlbmRlbnQgZmFsc2UtcG9zaXRpdmUgZmFpbHVyZQoKKiB0ZXN0cy9pbmNsdWRl LWV4Y2x1ZGU6IFNvcnQgZmlsZSBuYW1lIGxpc3QsIHNvIHRoYXQgdGhpcyB0ZXN0CmlzIG5vdCBz ZW5zaXRpdmUgdG8gdGhlIG9yZGVyIGluIHdoaWNoIHRob3NlIG5hbWVzIGFyZSByZXR1cm5lZAp2 aWEgcmVhZGRpci4gSSBub3RpY2VkIHRoZSBmYWlsdXJlIG9uIGEgRmVkb3JhIDIxIHN5c3RlbSB1 c2luZyBleHQ0LgpBbHNvIGZpeCBhIHR5cG86IHMvZnJhbWV3b3JrX2ZhaWx1cmUrL2ZyYW1ld29y a19mYWlsdXJlXy8KLS0tCiB0ZXN0cy9pbmNsdWRlLWV4Y2x1ZGUgfCA0ICsrLS0KIDEgZmlsZSBj aGFuZ2VkLCAyIGluc2VydGlvbnMoKyksIDIgZGVsZXRpb25zKC0pCgpkaWZmIC0tZ2l0IGEvdGVz dHMvaW5jbHVkZS1leGNsdWRlIGIvdGVzdHMvaW5jbHVkZS1leGNsdWRlCmluZGV4IDhiMmY1YWEu LmNkYmI5ZDYgMTAwNzU1Ci0tLSBhL3Rlc3RzL2luY2x1ZGUtZXhjbHVkZQorKysgYi90ZXN0cy9p bmNsdWRlLWV4Y2x1ZGUKQEAgLTE0LDcgKzE0LDcgQEAgcHJpbnRmICclc1xuJyB4L2E6YWFhIHgv YjpiYmIgICAgID4gZXhwLW5vdC1kaXIgfHwgZnJhbWV3b3JrX2ZhaWx1cmVfCiBwcmludGYgJyVz XG4nIHgvYTphYWEgICAgICAgICAgICAgPiBleHAtYSAgICAgICB8fCBmcmFtZXdvcmtfZmFpbHVy ZV8KIHByaW50ZiAnJXNcbicgYTphYWEgICAgICAgICAgICAgICA+IGV4cC1hYSAgICAgIHx8IGZy YW1ld29ya19mYWlsdXJlXwogcHJpbnRmICclc1xuJyBhYWEgICAgICAgICAgICAgICAgID4gZXhw LWFhYSAgICAgfHwgZnJhbWV3b3JrX2ZhaWx1cmVfCi1wcmludGYgJyVzXG4nIC4veC9hIC4veC9i IC4veC9kaXIvZCA+IGV4cC1kb3RuYW1lcyB8fCBmcmFtZXdvcmtfZmFpbHVyZSsKK3ByaW50ZiAn JXNcbicgLi94L2EgLi94L2IgLi94L2Rpci9kIHwgc29ydCA+IGV4cC1kb3RuYW1lcyB8fCBmcmFt ZXdvcmtfZmFpbHVyZV8KCiBncmVwIC1yIC0tZXhjbHVkZT0nYSonICAgIC4geCA+IG91dCB8fCBm YWlsPTEKIHNvcnQgb3V0ID4gayAmJiBtdiBrIG91dApAQCAtNTksNyArNTksNyBAQCBjb21wYXJl IGV4cC1hIG91dCB8fCBmYWlsPTEKIChjZCB4ICYmIGdyZXAgLXIgLS1leGNsdWRlLWRpcj0uICde YWFhJCcpID4gb3V0IHx8IGZhaWw9MQogY29tcGFyZSBleHAtYWEgb3V0IHx8IGZhaWw9MQoKLWdy ZXAgLS1leGNsdWRlPS0gJ15hYWEkJyAtIDwgeC9hID4gb3V0IHx8IGZhaWw9MQorZ3JlcCAtLWV4 Y2x1ZGU9LSAnXmFhYSQnIC0gPCB4L2EgfCBzb3J0ID4gb3V0IHx8IGZhaWw9MQogY29tcGFyZSBl eHAtYWFhIG91dCB8fCBmYWlsPTEKCiBmb3IgZXhjbHVkZSBpbiAneCcgJ3gqJzsgZG8KLS0gCjIu My43Cgo= --001a1140ae8a48ca66051b18ea4e-- From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 17 17:38:18 2015 Received: (at 21027-done) by debbugs.gnu.org; 17 Jul 2015 21:38:18 +0000 Received: from localhost ([127.0.0.1]:52308 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZGDKk-0003j4-Ab for submit@debbugs.gnu.org; Fri, 17 Jul 2015 17:38:18 -0400 Received: from mail-ie0-f181.google.com ([209.85.223.181]:33565) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZGDKi-0003ir-LK for 21027-done@debbugs.gnu.org; Fri, 17 Jul 2015 17:38:17 -0400 Received: by ietj16 with SMTP id j16so85680017iet.0 for <21027-done@debbugs.gnu.org>; Fri, 17 Jul 2015 14:38:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=btMlCDgdvVM2gYOHRCu3jONaPlaY95lrVtvUeH0LtiU=; b=PhPKMs8ucoG8WhzL9FkWidONMnsU7gF2MLI39HcBKGzFUnModo53jxRr2Crw3lnWf9 cyBMj7CFJW7MXDbFbZHmcOMlnDwnXDywRcH4IP54C57jj7XMNdfjChYKUwMW135z23L3 OEnjPVpWBXWJUdVmaE4HRe12P6KxtoAiO5WyhLjAJB6C1o2iG62lEtAcUfYA94Mr/Zto glunXtf2FYdx5J7b9jLZQvG8EQcEzQgL4KrvqWbk5K3Zwi/ewKLiO9fbiN/R+tZUjplS lA1ie6QnKDRiais7+hsxlBOPxZgnTyiGGm41L/Nid8BYSrjL/IywGJt5NTqF8XE6hGCV Cq+A== X-Received: by 10.107.14.148 with SMTP id 142mr20269080ioo.175.1437169090926; Fri, 17 Jul 2015 14:38:10 -0700 (PDT) MIME-Version: 1.0 Received: by 10.36.10.72 with HTTP; Fri, 17 Jul 2015 14:37:51 -0700 (PDT) In-Reply-To: References: <55A44B37.4070506@cs.ucla.edu> From: Jim Meyering Date: Fri, 17 Jul 2015 14:37:51 -0700 X-Google-Sender-Auth: hsK7qhLMtmtu7Zz5VgCMbwQ-fI0 Message-ID: Subject: Re: bug#21027: --exclude-dir matches search dir To: Paul Eggert , aron@arongriffis.com Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 21027-done Cc: 21027-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On Fri, Jul 17, 2015 at 2:31 PM, Jim Meyering wrote: > On Mon, Jul 13, 2015 at 4:35 PM, Paul Eggert wrote: >> Aron Griffis wrote: >>> >>> This generates output: >>> >>> $ grep -rl --exclude-dir=usr LINUX /usr/include >>> >>> and this doesn't: >>> >>> $ grep -rl --exclude-dir='usr*' LINUX /usr/include >>> >>> This feels like a bug. >> >> Thanks for reporting that. I installed the attached patch. > > I've pushed this small follow-up patch to fix a false-positive test failure: Grr... pushed the wrong patch. Fix-up here: http://git.savannah.gnu.org/cgit/grep.git/commit/?id=3f50c6f0b09dd5be1b3d8413eb0be606fe48599d From unknown Sun Aug 17 22:13:01 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 15 Aug 2015 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator