buggrep - Bugs: bug #11017, --exclude should also relate to...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #11017: --exclude should also relate to directories

Submitted by:  Stepan Kasal <kasal>
Submitted on:  Tue 16 Nov 2004 09:09:48 AM UTC  
Votes:  145  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Wont Fix
Privacy: PublicAssigned to: None
Open/Closed: Closed

(Jump to the original submission Jump to the original submission)

Sun 07 Oct 2007 02:36:57 PM UTC, comment #6:

Making --exclude apply to directory names would break systems that rely on the existing behaviour.

A new option has been introduced in grep-2.5.3, --exclude-dir that applies a pattern only to directory names.

Tony Abou-Assaleh <taa>
Project Administrator
Wed 27 Jun 2007 02:31:37 PM UTC, comment #5:

Man, I just realized that I still have my own build of grep on my box, since december 2005. Can we move on and apply that patch once and for all?

This would be useful for a lot of people, no matter if you can reproduce the same with find/xargs, etc. Pragmatism should rule: the common case should have an option for it.

Martin Blais <blais>
Sun 18 Dec 2005 07:27:42 PM UTC, comment #4:

This patch would be great, it is quite an annoyance when grepping in subversion directories without it...

Martin Blais <blais>
Thu 24 Feb 2005 02:24:54 PM UTC, comment #3:

I gave it a shot, changing really little in fact. I hope I am not missing anything, even though I've tested the patch to my best.

I would like to point out that should this patch be included, so would the isdir1 function in lib/savedir.c remain without references. If no one uses libgreputils, maybe it could be removed?

Claudio

Anonymous
Tue 16 Nov 2004 09:11:53 AM UTC, comment #2:

Well I mean patch #3521!

Stepan Kasal <kasal>
Project Member
Tue 16 Nov 2004 09:11:17 AM UTC, comment #1:

Sorry, I meant the (rejected) patch # 3521.

(Cut'n'paste plays tricks on me.)

Stepan Kasal <kasal>
Project Member
Tue 16 Nov 2004 09:09:48 AM UTC, original submission:

When run as

grep -r --exclude=.svn pattern .

grep should skip subdirectories named .svn .

See also the (rejected) patch #10537.

Stepan Kasal <kasal>
Project Member

 

Attached Files
file #2612:  grep_exclude.patch added by None (1KiB - application/octet-stream - apply exclusions and inclusions to directories too)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by taa (Posted a comment)
  • -unavailable- added by blais (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 145 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 9 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 07 Oct 2007 02:36:57 PM UTCtaaStatusNone=>Wont Fix
      Open/ClosedOpen=>Closed
    Wed 30 Aug 2006 06:09:44 PM UTCpclCarbon-Copy-=>Added -unavailable-
      Carbon-Copy-=>Added pcl
    Wed 30 Aug 2006 06:03:05 PM UTCmprudhomCarbon-Copy-=>Added mprudhom
    Wed 15 Mar 2006 12:19:02 AM UTCn1lwiCarbon-Copy-=>Added n1lwi
    Fri 10 Feb 2006 02:36:15 PM UTCcoppitCarbon-Copy-=>Added coppit
    Sun 18 Dec 2005 07:27:42 PM UTCblaisCarbon-Copy-=>Added blais
    Thu 24 Feb 2005 02:24:54 PM UTCNoneAttached File-=>Added grep_exclude.patch, #2234

    Back to the top


    Powered by Savane 3.1-cleanup1