[darcs-users] Re: Whitespace in filenames

Zack Brown zbrown at tumblerings.org
Fri Aug 1 16:05:12 UTC 2003


On Fri, Aug 01, 2003 at 11:38:08AM -0400, David Roundy wrote:
> On Fri, Aug 01, 2003 at 05:15:31PM +0200, Peter Simons wrote:
> > David Roundy writes:
> > 
> >  > Is whitespace in filenames something that people tend to use?
> > 
> > IMHO, the patch format should be able to deal with _any_ character in
> > a file name. Some file systems use Unicode for file names, thus even
> > \0 is a legal value there -- and _will_ occur.
> 
> Hmmmm.  Dealing with multibyte characters in filenames may be a problem.
> But dealing with really strange character shouldn't be, since the only
> problem (that I'm aware of anyways) is the parsing of filenames, and so
> that's only a problem with whitespace.  On the other hand, if the filenames
> are ever converted into C strings (by the haskell library), a \0 will wreak
> havoc, and could lead to weird errors.  On POSIX systems, C strings are
> generally used for filenames, so I imagine that a \0 in a filename *will*
> lead to errors.  The wrong file would be written to, which would cause
> really hard to track down errors.  :(
> 
> Currently there's nothing preventing null characters from being used in
> filenames, but it certainly scares me.  At the least, I would think that a
> special flag should be required in order to add such a file, as is
> currently the case with file names that differ only in case.  It would be
> nice to not have people accidentally create a repository that cannot be
> used on a different platform or filesystem.  It would be nice to be able to
> move a repository from one file system to another without it becoming
> invalid.
> 
> In short, it seems (upon reflection) that in general it would be better to
> restrict filenames to contain only those characters that are valid on
> *every* filesystem, except that we don't want to cause problems using darcs
> with already existing projects that might use such characters.

It just doesn't seem like the job of the version control system to
implement this kind of policing. Darcs should be powerful enough to blow
holes in walls. It's up to the users to master that power, and bend it to
their will.

There's no reason why the issue of filename conventions should not be in
the hands of the projects that use darcs. If a project is going to be
developed in a cross platform way, it's easy for them to say, "OK
fellas, no spaces" or whatever. And if instead, they want to use spaces,
they should be able to.

I think better than supporting only the lowest common denominator, would be
to have darcs support *all* the features of *every* filesystem out there
(or at least make that support easy and clean to add later). If there's a
feature on some obscure filesystem, darcs can handle it without a hiccup. Now
*that's* a cool tool. Put all the power in the hands of the user, and let
them fly where they will.

Be well,
Zack

> -- 
> David Roundy
> http://www.abridgegame.org
> 
> _______________________________________________
> darcs-users mailing list
> darcs-users at abridgegame.org
> http://www.abridgegame.org/mailman/listinfo/darcs-users

-- 
Zack Brown




More information about the darcs-users mailing list