aboutsummaryrefslogtreecommitdiff
path: root/src/filter
diff options
context:
space:
mode:
authorAdrian Kummerlaender2016-02-14 20:52:29 +0100
committerAdrian Kummerlaender2016-02-14 20:52:29 +0100
commit1ffaf37388cd691e88196b6e00455eda0e652cf0 (patch)
treedb1109d7528d4ac563ca61dd28eb35e1ee78c649 /src/filter
parentf8eecef184c8684a3ed27712ccf8f7f866d47c40 (diff)
downloadchange-1ffaf37388cd691e88196b6e00455eda0e652cf0.tar
change-1ffaf37388cd691e88196b6e00455eda0e652cf0.tar.gz
change-1ffaf37388cd691e88196b6e00455eda0e652cf0.tar.bz2
change-1ffaf37388cd691e88196b6e00455eda0e652cf0.tar.lz
change-1ffaf37388cd691e88196b6e00455eda0e652cf0.tar.xz
change-1ffaf37388cd691e88196b6e00455eda0e652cf0.tar.zst
change-1ffaf37388cd691e88196b6e00455eda0e652cf0.zip
Implement support for excluding arbitrary paths from tracking
The library may be provided with a new-line separated list of regular expressions via the newly introduced `CHANGE_LOG_IGNORE_PATTERN_PATH`. Any proposed tracking path that is matched by any of the provided patterns is excluded from change reporting. This functionality uses the Standard's regular expression parsing functionality and as such doesn't introduce any new dependencies. If no file path is provided or the provided file path is unreadable all paths will be tracked. `change` was adapted to set `CHANGE_LOG_IGNORE_PATTERN_PATH` to `.change_log_ignore` which means that it will by default exclude any patterns provided via this file in the current working directory. An example for such a file customized for hiding _vim_'s internal write logic may look as follows: [0-9]+ [^~]*~ [.*\.viminfo .*\.swp Note that this is implemented in a fashion where it is not guaranteed that the full _canonical_ path is checked against the patterns. It remains to be decided if this is enough for all common use cases of this new functionality. `tracking::PathMatcher` lacks any explicit thread synchronization - according to my current knowledge this should not be necessary as we are only ever reading the private `std::vector<std::regex>` instance. If invalid regular expressions are provided they are silently ignored.
Diffstat (limited to 'src/filter')
0 files changed, 0 insertions, 0 deletions