From owner-p4-projects@FreeBSD.ORG Fri Jun 6 00:33:09 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D93471065674; Fri, 6 Jun 2008 00:33:08 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9B4801065683 for ; Fri, 6 Jun 2008 00:33:08 +0000 (UTC) (envelope-from peter-gmail@wemm.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 849E98FC14 for ; Fri, 6 Jun 2008 00:33:08 +0000 (UTC) (envelope-from peter-gmail@wemm.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m560X8Rf007775 for ; Fri, 6 Jun 2008 00:33:08 GMT (envelope-from peter-gmail@wemm.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m560X88X007773 for perforce@freebsd.org; Fri, 6 Jun 2008 00:33:08 GMT (envelope-from peter-gmail@wemm.org) Date: Fri, 6 Jun 2008 00:33:08 GMT Message-Id: <200806060033.m560X88X007773@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter-gmail@wemm.org using -f From: Peter Wemm To: Perforce Change Reviews Cc: Subject: PERFORCE change 142994 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jun 2008 00:33:09 -0000 http://perforce.freebsd.org/chv.cgi?CH=142994 Change 142994 by peter@peter_overcee on 2008/06/06 00:32:58 Bah. I needed to grep within the .svn directories. Add --exclude-junk for the benefit of alias. Affected files ... .. //depot/projects/hammer/gnu/usr.bin/grep/grep.c#9 edit .. //depot/projects/hammer/gnu/usr.bin/grep/grep.h#4 edit .. //depot/projects/hammer/gnu/usr.bin/grep/savedir.c#5 edit Differences ... ==== //depot/projects/hammer/gnu/usr.bin/grep/grep.c#9 (text+ko) ==== @@ -102,6 +102,7 @@ INCLUDE_OPTION, EXCLUDE_OPTION, EXCLUDE_FROM_OPTION, + EXCLUDE_JUNK_OPTION, LINE_BUFFERED_OPTION, LABEL_OPTION }; @@ -123,6 +124,7 @@ {"extended-regexp", no_argument, NULL, 'E'}, {"exclude", required_argument, NULL, EXCLUDE_OPTION}, {"exclude-from", required_argument, NULL, EXCLUDE_FROM_OPTION}, + {"exclude-junk", no_argument, NULL, EXCLUDE_JUNK_OPTION}, {"file", required_argument, NULL, 'f'}, {"files-with-matches", no_argument, NULL, 'l'}, {"files-without-match", no_argument, NULL, 'L'}, @@ -169,6 +171,7 @@ int match_words; int match_lines; unsigned char eolbyte; +int exclude_junk; /* For error messages. */ /* The name the program was run with, stripped of any leading path. */ @@ -1709,6 +1712,10 @@ label = optarg; break; + case EXCLUDE_JUNK_OPTION: + exclude_junk = 1; + break; + case 0: /* long options */ break; ==== //depot/projects/hammer/gnu/usr.bin/grep/grep.h#4 (text+ko) ==== @@ -42,3 +42,4 @@ extern int match_words; /* -w */ extern int match_lines; /* -x */ extern unsigned char eolbyte; /* -z */ +extern int exclude_junk; /* --exclude-junk */ ==== //depot/projects/hammer/gnu/usr.bin/grep/savedir.c#5 (text+ko) ==== @@ -68,6 +68,7 @@ #include #include "savedir.h" +#include "grep.h" char *path; size_t pathlen; @@ -134,7 +135,8 @@ off_t size_needed = (namep - name_space) + NAMLEN (dp) + 2; /* Exclude SCM control files and other known junk */ - if ((strcmp(dp->d_name, ".svn") == 0 || + if (exclude_junk && + (strcmp(dp->d_name, ".svn") == 0 || strcmp(dp->d_name, "CVS") == 0 || strcmp(dp->d_name, "RCS") == 0 || strcmp(dp->d_name, "obj") == 0 ||