While attempting to help a new user with setting up their repository, I noticed that all of the help text uses the word 'GLOB' but it isn't defined anywhere. There are a few examples in each of the commands, but they only hint at what is allowed.

A quick check of the sources confirms my suspicion that the meaning is entirely delegated to SQLite, so I looked for the documentation of the GLOB operator there, and learned only that it "uses the Unix file globbing syntax" and that it is case sensitive.

The SQLite source code[1] provides an exact definition. But I suspect most new fossil users would not wander that far down the garden path.

Even if they do wander that far, the SQLite document won't tell them that *.o in the bld folder would be matched by the glob "bld/*.o" and not by the glob "*.o" or the glob "/bld/*.o".

So the result is the new document www/globs.md in which I intend to document everything about the GLOB patterns as well as the file names they match against. I have at least some coverage of most of what it occurred to me to say in it now, but it especially needs proof-reading and checking for things that I missed saying at all.

I've checked it in on the glob-docs branch until it has been read by at least one more pair of eyes.

I'm also considering an extension to the glob_create() function to add support for comments in lists of GLOBs. This would be specifically useful in the versioned settings, and specifically would bring the definition of ignore-glob much closer to the syntax used by Git. For consistency with Git (and Tcl and TH1), I would define a comment as # to end of line but I'm open to discussion of alternatives.

[1]: http://www.sqlite.org/src/artifact/9d52522cc8ae7f5c?ln=616-631

--
Ross Berteig                               r...@cheshireeng.com
Cheshire Engineering Corp.           http://www.CheshireEng.com/
+1 626 303 1602

_______________________________________________
fossil-dev mailing list
fossil-dev@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/fossil-dev

Reply via email to