"bzr ignore" behavoir
John Arbash Meinel
john at arbash-meinel.com
Fri Dec 9 15:04:15 UTC 2011
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 12/9/2011 3:33 PM, Alexander Belchenko wrote:
> I have a question: is there any difference for bzr between "./foo"
> and "./foo/" in the .bzrignore file?
>
> At least `bzr ignore` behaves strange IMHO:
>
> C:\Temp\2>bzr init Created a standalone tree (format: 1.14)
>
> C:\Temp\2>bzr ignore "./foo/"
>
> C:\Temp\2>bzr diff === added file '.bzrignore' --- .bzrignore
> 1970-01-01 00:00:00 +0000 +++ .bzrignore 2011-12-09 14:32:25
> +0000 @@ -0,0 +1,1 @@ +./foo
>
>
> Why has it been added to .bzrignore without trailing slash? Is it
> something win32-specific and related to custom command-line parsing
> code with glob expanding?
I don't think it has to do with win32, I think the issue is that if
you put "./foo/" it will fail to actually ignore the foo directory.
Because when we check the path to ignore, the path we are comparing
with is "./foo" which *doesn't* match ./foo/. So 'bzr ignore' strips
the trailing slash to make sure we do what you are actually asking for.
I could be wrong, but it is easy to check by manually editing the file.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk7iI28ACgkQJdeBCYSNAAMP6gCfeFdkjCa2Da57nh/8qGof3zTT
Qx0AoMbJitXv/8D9FvfX/fEDja7h45VY
=uOa9
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list