[darcs-devel] [patch2127] append slashes to dirs before matching against boring regexps

Ben Franksen bugs at darcs.net
Sun Dec 20 07:08:08 UTC 2020

Ben Franksen <ben.franksen at online.de> added the comment:

> What does this mean for backwards compatibility?

It's not 100% compatible, of course. If your regex is


then this no longer matches a directory called somename, just a file.

I expect the impact to be small because the standard pattern to match a
directory has always been


which retains its meaning as "match a file or a directory and anything
under it". This is how our default boring file did it (e.g. for CVS and
.git directories) and I guess most users have borrowed that pattern. If
instead you don't want to match a file you can now say


to match only a directory (and anything under it), which previously did
not work because it didn't match the directory itself.

Our own .boring broke due to that change: the pattern "dist[^/]*$" no
longer matches the dist or dist-newstyle directories. Replacing the '$'
with a '/' fixes that, see one of the follow-up patches I sent. The
other follow-up patch changes the default boring file to more
specifically match only directories when that was the intention.

Darcs bug tracker <bugs at darcs.net>

More information about the darcs-devel mailing list