GNU bug report logs - #21027
--exclude-dir matches search dir

Previous Next

Package: grep;

Reported by: Aron Griffis <aron <at> arongriffis.com>

Date: Fri, 10 Jul 2015 03:59:01 UTC

Severity: normal

Merged with 21026

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 21027 in the body.
You can then email your comments to 21027 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-grep <at> gnu.org:
bug#21027; Package grep. (Fri, 10 Jul 2015 03:59:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Aron Griffis <aron <at> arongriffis.com>:
New bug report received and forwarded. Copy sent to bug-grep <at> gnu.org. (Fri, 10 Jul 2015 03:59:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Aron Griffis <aron <at> arongriffis.com>
To: bug-grep <at> gnu.org
Subject: --exclude-dir matches search dir
Date: Thu, 9 Jul 2015 23:57:40 -0400
[Message part 1 (text/plain, inline)]
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
[Message part 2 (text/html, inline)]

Merged 21026 21027. Request was from Paul Eggert <eggert <at> cs.ucla.edu> to control <at> debbugs.gnu.org. (Sat, 11 Jul 2015 12:31:01 GMT) Full text and rfc822 format available.

Reply sent to Paul Eggert <eggert <at> cs.ucla.edu>:
You have taken responsibility. (Mon, 13 Jul 2015 23:36:02 GMT) Full text and rfc822 format available.

Notification sent to Aron Griffis <aron <at> arongriffis.com>:
bug acknowledged by developer. (Mon, 13 Jul 2015 23:36:02 GMT) Full text and rfc822 format available.

Message #12 received at 21027-done <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Aron Griffis <aron <at> arongriffis.com>, 21027-done <at> debbugs.gnu.org
Subject: Re: bug#21027: --exclude-dir matches search dir
Date: Mon, 13 Jul 2015 16:35:19 -0700
[Message part 1 (text/plain, inline)]
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.

[0001-grep-fix-bug-with-exclude-dir-and-command-line.patch (text/x-diff, attachment)]

Reply sent to Paul Eggert <eggert <at> cs.ucla.edu>:
You have taken responsibility. (Mon, 13 Jul 2015 23:36:02 GMT) Full text and rfc822 format available.

Notification sent to Aron Griffis <aron <at> arongriffis.com>:
bug acknowledged by developer. (Mon, 13 Jul 2015 23:36:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-grep <at> gnu.org:
bug#21027; Package grep. (Fri, 17 Jul 2015 21:32:02 GMT) Full text and rfc822 format available.

Message #20 received at 21027-done <at> debbugs.gnu.org (full text, mbox):

From: Jim Meyering <jim <at> meyering.net>
To: Paul Eggert <eggert <at> cs.ucla.edu>, aron <at> arongriffis.com
Cc: 21027-done <at> debbugs.gnu.org
Subject: Re: bug#21027: --exclude-dir matches search dir
Date: Fri, 17 Jul 2015 14:31:27 -0700
[Message part 1 (text/plain, inline)]
On Mon, Jul 13, 2015 at 4:35 PM, Paul Eggert <eggert <at> cs.ucla.edu> 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:
[0001-tests-avoid-FS-dependent-false-positive-failure.patch (text/x-patch, attachment)]

Information forwarded to bug-grep <at> gnu.org:
bug#21027; Package grep. (Fri, 17 Jul 2015 21:39:02 GMT) Full text and rfc822 format available.

Message #23 received at 21027-done <at> debbugs.gnu.org (full text, mbox):

From: Jim Meyering <jim <at> meyering.net>
To: Paul Eggert <eggert <at> cs.ucla.edu>, aron <at> arongriffis.com
Cc: 21027-done <at> debbugs.gnu.org
Subject: Re: bug#21027: --exclude-dir matches search dir
Date: Fri, 17 Jul 2015 14:37:51 -0700
On Fri, Jul 17, 2015 at 2:31 PM, Jim Meyering <jim <at> meyering.net> wrote:
> On Mon, Jul 13, 2015 at 4:35 PM, Paul Eggert <eggert <at> cs.ucla.edu> 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




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 15 Aug 2015 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 8 years and 282 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.