[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Best practices: living with .svn?

From: Kalle Olavi Niemitalo <kon_at_iki.fi>
Date: 2004-04-11 18:26:31 CEST

Stephen Peters <portnoy@portnoy.org> writes:

> I've made use of
> alias rg='grep --exclude=\*.svn\* -r'

In GNU grep 2.5.1, --exclude does not apply to names of
directories. (See grep-2.5.1/lib/savedir.c.) Thus, that command
will still search all .svn/README.txt files, among others.

A pipe like this would avoid that problem:

  find . -name .svn -prune -or -print0 | xargs -r0 grep -H regex

However, this is more difficult to wrap with a grep-like syntax:
the directory (or file) names would have to be separated from
grep options, and names like -foo would have to be changed to

I think the cleanest solution would be to patch grep. It could
take a new "--exclude-dir=.svn" option, or extend the existing
"--exclude=.svn" to affect directories too, or require

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sun Apr 11 18:28:01 2004

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.