mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 08:18:15 +03:00
5e5ee6c32d
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 |
||
---|---|---|
.. | ||
git | ||
test | ||
Blob.h | ||
CMakeLists.txt | ||
Hash.cpp | ||
Hash.h | ||
ParentCommits.cpp | ||
ParentCommits.h | ||
Tree.cpp | ||
Tree.h | ||
TreeEntry.cpp | ||
TreeEntry.h |