1#![warn(missing_docs)]
3#![forbid(unsafe_code)]
4pub mod check_ignore;
5pub mod error;
6pub mod root;
7pub mod types;
8pub mod util;
9
10pub use types::hashalgorithm::HashAlgorithm;
11pub use types::recheckmethod::RecheckMethod;
12
13pub use types::xvcdigest::content_digest::ContentDigest;
14pub use types::xvcdigest::path_collection_digest::PathCollectionDigest;
15pub use types::xvcdigest::stdout_digest::StdoutDigest;
16pub use types::xvcdigest::url_get_digest::UrlContentDigest;
17pub use types::xvcdigest::xvc_metadata_digest::XvcMetadataDigest;
18pub use types::xvcdigest::AttributeDigest;
19pub use types::xvcdigest::XvcDigest;
20pub use types::xvcdigest::XvcDigests;
21
22pub use types::diff::Diff;
23pub use types::diff::DiffStore;
24pub use types::diff::DiffStore2;
25pub use types::diff::DiffStore3;
26pub use types::diff::DiffStore4;
27
28pub use types::diff::apply_diff;
29pub use types::diff::diff_store;
30pub use types::diff::update_with_actual;
31
32pub use types::textorbinary::TextOrBinary;
33pub use types::xvcfiletype::XvcFileType;
34pub use types::xvcmetadata::XvcMetadata;
35pub use types::xvcpath::XvcCachePath;
36pub use types::xvcpath::XvcPath;
37pub use types::xvcroot::find_root;
38pub use types::xvcroot::XvcRoot;
39
40pub use error::Error;
41pub use error::Result;
42
43pub use xvc_ecs::error::Error as XvcEcsError;
45pub use xvc_ecs::error::Result as XvcEcsResult;
46pub use xvc_ecs::{
47 persist, Event, EventLog, HStore, R11Store, R1NStore, RMNStore, SharedHStore, SharedXStore,
48 Storable, VStore, XvcEntity, XvcStore,
49};
50
51pub use xvc_logging::{
52 debug, error, info, output, panic, setup_logging, trace, uwo, uwr, warn, watch, XvcOutputLine,
53 XvcOutputSender,
54};
55
56pub use xvc_walker as walker;
57pub use xvc_walker::Error as XvcWalkerError;
58pub use xvc_walker::Result as XvcWalkerResult;
59
60pub use xvc_walker::{
61 content_to_patterns, make_polling_watcher, path_metadata_map_from_file_targets, walk_parallel,
62 walk_serial, AbsolutePath, Glob, IgnoreRules, MatchResult, PathEvent, PathSync, WalkOptions,
63};
64
65pub use xvc_config::error::Error as XvcConfigError;
66pub use xvc_config::error::Result as XvcConfigResult;
67pub use xvc_config::FromConfig;
68pub use xvc_config::UpdateFromConfig;
69pub use xvc_config::XvcConfig;
70pub use xvc_config::XvcConfigOptionSource;
71pub use xvc_config::XvcConfiguration;
72pub use xvc_config::XvcLoadParams;
73pub use xvc_config::XvcOptionalConfiguration;
74pub use xvc_config::XvcVerbosity;
75
76pub use xvc_config::blank_optional_config;
77pub use xvc_config::configuration;
78
79pub use util::git;
80
81pub use util::file::{all_paths_and_metadata, dir_includes, glob_includes, glob_paths};
82pub use util::git::{
83 build_gitignore, exec_git, get_absolute_git_command, get_git_tracked_files, git_auto_commit,
84 git_auto_stage, git_checkout_ref, git_ignored, handle_git_automation, inside_git,
85 stash_user_staged_files, unstash_user_staged_files,
86};
87
88pub use util::pmp::XvcPathMetadataProvider;
89pub use util::XvcPathMetadataMap;
90
91pub const CHANNEL_BOUND: usize = 1000000;
94
95pub const XVC_DIR: &str = ".xvc";
99
100pub const XVCIGNORE_FILENAME: &str = ".xvcignore";
105
106pub const XVCIGNORE_INITIAL_CONTENT: &str = "
110# Add patterns of files xvc should ignore, which could improve
111# the performance.
112# It's in the same format as .gitignore files.
113
114.DS_Store
115";
116
117pub const GIT_DIR: &str = ".git";
121
122pub const GUID_FILENAME: &str = "guid";
128
129pub const GITIGNORE_INITIAL_CONTENT: &str = "
133## Following are required for Xvc to function correctly.
134.xvc/*
135!.xvc/guid
136!.xvc/store/
137!.xvc/ec/
138!.xvc/config.toml
139!.xvc/pipelines/
140";