DEP-5: file globbing
On Thu, Aug 12, 2010 at 06:18:24PM -0700, Russ Allbery wrote:
> > File globbing syntax
> > --------------------
> > Here is what I think represents the broader consensus from previous
> > discussion:
> > * **`Files`**: List of space-separated pathnames indicating files that
> > have the same licence. Question marks indicate any character and
> > asterisks indicate any string of characters. When this field is omitted
> > in the first paragraph containing a `License` field, its value will be
> > assumed to be '*'. If multiple `Files` declaratioun match the same
> > file, then only the last match counts.
> I would prefer to use the same syntax as .gitignore, since it already
> deals with all of the complicated cases of matching files in particular
> paths versus a file by that name anywhere in the tree and does so in a
> well-specified way.
Is http://www.kernel.org/pub/software/scm/git/docs/gitignore.html an
accurate description of the .gitignore syntax as you understand it?
I find several features here that are suboptimal:
- Patterns are one per line. While this sidesteps the question of escaping
embedded spaces, it also consumes a lot more vertical space, reducing
- I don't think we want to support negation of patterns; any pattern
negation could instead be expressed as a separate stanza afterwards that
overrides the previous one.
- Use of a leading slash to anchor a pathname to the toplevel package
directory is an unusual and non-intuitive convention that definitely adds
complexity to the implementation of any tools that map Files: globs to
the actual files.
For my part, I think DEP-5 is already on the right track regarding globbing
syntax, but badly needs improvement of the standards language.
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer http://www.debian.org/