1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
//! Find, parse, and interpret ignore files.
//!
//! Ignore files are files that contain ignore patterns, often following the `.gitignore` format.
//! There may be one or more global ignore files, which apply everywhere, and one or more per-folder
//! ignore files, which apply to a specific folder and its subfolders. Furthermore, there may be
//! more ignore files in _these_ subfolders, and so on. Discovering and interpreting all of these in
//! a single context is not a simple task: this is what this crate provides.
//!
//! Discovery and loading are explicit snapshots. This crate does not watch ignore files for edits or
//! automatically rediscover files created later; call the discovery/loading APIs again, or update an
//! unfinished [`IgnoreFilter`] with its mutation methods.
use ;
use NormalizePath;
use ProjectType;
pub use *;
pub use *;
pub use *;
/// Directory names treated as version-control metadata.
///
/// Used internally for ignore-file discovery. Reuse this list when ignoring VCS metadata to
/// automatically follow additions to the crate's discovery support.
pub const VCS_DIR_NAMES: & = &;
/// An ignore file.
///
/// This records both the path to the ignore file and some basic metadata about it: which project
/// type it applies to if any, and which subtree it applies in if any (`None` = global ignore file).
pub