Minimal, pure-Clojure .gitignore matcher — the JGit-free replacement for
IgnoreNode. Parses ONE .gitignore file (the one at a walk root) into
ordered rules and evaluates a /-separated relative path against them with
git's semantics: last matching rule wins, ! negates, a trailing /
restricts to directories, a leading/embedded / anchors to the root, and a
slash-free pattern matches at any depth.
Minimal, pure-Clojure `.gitignore` matcher — the JGit-free replacement for `IgnoreNode`. Parses ONE `.gitignore` file (the one at a walk root) into ordered rules and evaluates a `/`-separated relative path against them with git's semantics: last matching rule wins, `!` negates, a trailing `/` restricts to directories, a leading/embedded `/` anchors to the root, and a slash-free pattern matches at any depth.
(ignored? matcher rel path-dir?)True when the /-separated relative path rel (with path-dir? telling
whether it is a directory) is ignored by matcher. Last matching rule wins;
a ! rule un-ignores. nil matcher → false.
True when the `/`-separated relative path `rel` (with `path-dir?` telling whether it is a directory) is ignored by `matcher`. Last matching rule wins; a `!` rule un-ignores. nil matcher → false.
(load-matcher root)Parse root/.gitignore into an ordered rule vector, or nil when absent.
The returned value is opaque; pass it to ignored?.
Parse `root`/.gitignore into an ordered rule vector, or nil when absent. The returned value is opaque; pass it to `ignored?`.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |