Comment 9 for bug 3780

Revision history for this message
Richard Wilbur (richard-wilbur) wrote : Re: [Bug 3780] Re: 'bzr ignore' in subdirectory should prepend relative path

On Thu, 2006-10-19 at 03:21 +0000, Aaron Bentley wrote:
> Richard Wilbur wrote:
> > John, Martin, et al:
> >
> > 2. Jules does a find of certain files he wants to ignore and notices that in a particular subdirectory of his branch a certain filetype appears. He types
> > ``bzr ignore /absolute/path/from/find/*.filetype`` and, since it is in his branch, a branch-root-relative pattern is added to the ignore file. (Advantage: Jules can select/copy and paste the path from the find output directly into his command line without having to trim to his branch base directory.)
>
> I'd like to propose that we not do this. I would like it to be a
> branch-root-relative filename.
>
> I think the earlier problem of ignoring multiple files is that we were
> trying to make the ignore command handle both filenames and patterns.
In my understanding, a filename is a pattern. It just matches only one
file--unless you add a ? or * to the filename without escaping it. Then
when ignore tries to interpret it as a pattern it will naturally see
those characters as wildcards.

>
> An ignore command that just does filenames works better with unix
> commandline tools than an ignore command that supports patterns. (This
> is particularly true when a filename includes square brackets).
>
> When people want to edit their patterns, it's probably easier to edit
> .bzrignore than to run "bzr ignore". Or they can run "bzr ignore
> - --pattern", if you prefer.
In my reading, the current documentation for ignore speaks of a list of
patterns to which bzr ignore is designed to append unique additions.
>
> Aaron