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
//! On-disk data model: config, file entries, manifests, commits.
//!
//! Everything is plain JSON so the repo (and the remote) stays inspectable
//! with nothing more than `cat`. The remote is a *bare* stowe repo: the same
//! `commits/` + `objects/` + `refs/main`, just without a working tree.
use ;
use BTreeMap;
/// `.stowe/config` - named remotes (`name -> url`) and, optionally, an explicit
/// on-disk format per remote (`name -> "mirror"|"backup"`). A remote with no
/// entry in `formats` falls back to the scheme default (local → mirror, s3 →
/// backup). `serde(default)` keeps configs written before `formats` existed
/// readable.
/// `mounts` holds an optional shell command per remote that makes it available
/// (mount the drive, bring up an sshfs). Local remotes only: an `s3://` store
/// has no path to mount.
/// One tracked file in a snapshot.
///
/// `hash` is the blake3 of the file's full content - it *is* the object's name
/// in the store, so identical content is stored once (that's the dedup).
/// `size` + `mtime` are only used to skip re-hashing files that look unchanged.
///
/// `fp` is an optional *audio* fingerprint: the blake3 of the file's decoded
/// PCM, which (unlike `hash`) is stable across tag edits. It's `None` for
/// non-audio files and only ever used by `diff` to recognise a re-tagged song
/// as a move. `serde(default)` keeps manifests written before `fp` existed
/// readable.
/// A snapshot of the whole working tree, sorted by path.
pub type Manifest = ;
/// A commit: a message, a time, the parent it descends from, and the full
/// snapshot of files at that point. Linear history only (one parent, no merges).