mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 08:18:15 +03:00
b7ff172fc6
Summary: This adds some initial code for handling gitignore files. I did check to see if there were APIs from libgit2 that we could leverage for this, but it does not look like we can easily use their functionality. The libgit2 ignore code seems to tightly coupled with their repository data structures, and it requires that you actually have a git repository. This code isn't quite 100% compatible with git's semantics yet. In particular: - For now we are just using fnmatch() to do the matching. This is currently inefficient as we have to do string allocations on each match attempt. This also doesn't quite match git's behavior, particularly with regard to "**" inside patterns. - The code currently does not have a mechanism for indicating if a path refers to a directory or not, so trailing slashes in the pattern are not honored correctly. We will probably need to implement our own fnmatch-like function in the future to solve these issues. Reviewed By: bolinfest Differential Revision: D4156480 fbshipit-source-id: 8ceaefd3805358ae2edc29bfc316e5c8f2fb7d31 |
||
---|---|---|
.. | ||
cli | ||
config | ||
inodes | ||
integration | ||
journal | ||
model | ||
rocksdb | ||
service | ||
store | ||
testharness |