sapling/eden
Michael Bolin 5e5ee6c32d Extend GlobMatcher to support an IGNORE_DOTFILES option.
Summary:
When `GlobMatcher` is used to implement `glob()` for Eden, `**` should not
include dotfiles by default (at least when it is used to implement `glob()` in Buck),
so we need to make this configurable. To this end, this adds a `GlobOptions`
parameter to `GlobMatcher::create()`. The key option this revision introduces is
`GlobOptions::IGNORE_DOTFILES`.

We implement this new functionality by associating a `matchCanStartWithDot`
boolean with the following opcodes in `GlobMatcher`:

* `GLOB_STAR`
* `GLOB_STAR_STAR_END`
* `GLOB_STAR_STAR_SLASH`
* `GLOB_ENDS_WITH`

The value of `matchCanStartWithDot` is largely determined by
`GlobOptions::IGNORE_DOTFILES`, though some extra checking is done
when assigning this for `GLOB_STAR`.

Originally, `GLOB_ENDS_WITH` required some funny business in how it
manipulated the `result` vector. This revision introduces some new funny
business to preserve the desired optimization.

Most of the work in this revision is new logic to ensure `matchCanStartWithDot`
is honored appropriately for each opcode.

Reviewed By: simpkins

Differential Revision: D7787621

fbshipit-source-id: f2c42e0f0948db74d48dc163d40aa3b13bbb4c3d
2018-05-02 12:21:04 -07:00
..
cli thread the clone revision through when loading arcconfig 2018-04-28 17:03:33 -07:00
docs storage documentation tweaks 2018-04-13 12:37:53 -07:00
fs Extend GlobMatcher to support an IGNORE_DOTFILES option. 2018-05-02 12:21:04 -07:00
hooks Remove TARGETS files 2018-02-20 19:57:45 -08:00
integration fix bug incorrectly reporting a file as modified 2018-04-30 22:10:01 -07:00
py refactor CLI subcommand definitions 2018-04-19 17:59:51 -07:00
scripts unmount stale edenfs mounts in eden doctor 2018-01-19 11:06:51 -08:00
third-party Remove TARGETS files 2018-02-20 19:57:45 -08:00
AUTODEPS Set up arc lint to run autodeps automatically for Eden. 2017-11-21 18:23:41 -08:00
DEFS rename the CLI rule from cli to eden 2018-04-18 21:00:39 -07:00
Eden.project.toml Eden.project.toml file for Nuclide 2018-04-26 11:05:23 -07:00