You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Knut Wannheden <kn...@gmail.com> on 2005/09/23 07:46:46 UTC

svn add ignores the ignore patterns

Hi all,

I just found out that the svn add command will ignore the ignore
patterns (both global-ignores config and the svn:ignore property) for
paths explicitly passed as parameters to it. E.g.

$ mkdir mydir

$ svn add mydir
A         mydir

$ cd mydir/

$ touch myfile

$ svn ps svn:ignore myfile .
property 'svn:ignore' set on '.'

$ svn st
A      .

$ svn add myfile
A         myfile

$ svn st
A      .
A      myfile

I assume this is the intended behaviour. But the reason I'm bringing
this up is that this is not mentioned anywhere in the SVN book. Should
I report this as a documentation enhancement request to the issue
tracker?

Regards,

Knut Wannheden

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


Re: svn add ignores the ignore patterns

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Sep 23, 2005, at 09:46, Knut Wannheden wrote:

> I just found out that the svn add command will ignore the ignore
> patterns (both global-ignores config and the svn:ignore property) for
> paths explicitly passed as parameters to it. [...]

> I assume this is the intended behaviour. But the reason I'm bringing
> this up is that this is not mentioned anywhere in the SVN book. Should
> I report this as a documentation enhancement request to the issue
> tracker?

It is the intended behavior. I agree the documentation is misleading,  
in particular the last paragraph in this section:

http://svnbook.red-bean.com/nightly/en/ 
svn.advanced.props.html#svn.advanced.props.special.ignore

"The list of patterns to ignore is also used by svn add and svn  
import. Both of these operations involve asking Subversion to begin  
managing some set of files and directories. Rather than force the  
user to pick and choose which files in a tree she wishes to start  
versioning, Subversion uses the ignore patterns to determine which  
files should not be swept into the version control system as part of  
a larger recursive addition or import operation."

It should say that svn add only uses the ignore list with respect to  
the contents of a directory you're adding. But when you specify a  
target to svn add, that target is added, even if it is in the ignore  
list.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org