This is an archive of the discontinued Mercurial Phabricator instance.

overlayworkingctx: remove misleading trailing slash from directory pattern
ClosedPublic

Authored by martinvonz on Apr 10 2019, 8:50 PM.

Details

Summary

The paths passed into the matcher are normalized (this applies to
include patterns and regular patterns, and to both glob kind and path
kind), so the regex for input "foo/" ended up being "foo(?:/|$)".

Once we have a (recursive) pattern kind only for directories, we could
switch to that here and remove the "mfiles[0] == path" check. Until
then, let's at least make it not misleading.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

martinvonz created this revision.Apr 10 2019, 8:50 PM
pulkit accepted this revision.Apr 12 2019, 8:19 AM
This revision was automatically updated to reflect the committed changes.