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
65
66
use Result;
use crate;
/// Save tracked files as they change
///
/// Runs in the foreground: installs filesystem watches for every autosaved
/// tracked entry, saves a checkpoint once a changed file has been quiet for
/// `history.watch.debounce` (a file that keeps changing never delays the
/// others; `history.watch.max_interval` saves it regardless), and
/// reconciles the whole set at startup, every `history.watch.reconcile`,
/// and when the configuration changes. Manual-save entries are never
/// watched.
///
/// With a connected setup repository the watcher also synchronizes per
/// `settings.history.sync`: in `sync` mode it publishes within
/// `history.sync_interval` after a save, fetches every
/// `history.fetch_interval`, and applies incoming changes once the complete setup is conflict-free;
/// in `fetch-only` mode it only fetches; in `manual` mode it does nothing
/// on the network. A failed sync backs off and is retried while saving
/// continues. `--once` runs one reconcile and one such synchronization.
///
/// The `history-watch` built-in service runs this for you:
///
/// [bootstrap.services.mise-history]
/// builtin = "history-watch"
///
/// Exit codes: 0 when history is disabled or another watcher already runs;
/// 1 when git is unusable, the store cannot open, or no watch can be
/// installed. A capture that fails is retried with backoff and never drops
/// the pending changes; one that would overlap another history operation
/// is deferred.
pub
static AFTER_LONG_HELP: &str = cstr!;