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
67
68
69
70
71
72
//! nusy-arrow-git — Graph-native git primitives for NuSy Arrow substrate.
//!
//! Provides 8 git primitives operating on Arrow RecordBatches, designed
//! for versioning RDF-like knowledge graphs stored in `nusy-arrow-core`.
//!
//! # Primitives
//!
//! 1. **Object Store** — the live [`GitObjectStore`] wrapping `ArrowGraphStore`
//! 2. **Commit** — snapshot state to Parquet + record in [`CommitsTable`]
//! 3. **Checkout** — restore state from a commit's Parquet snapshot
//! 4. **History DAG** — traverse parent_ids for [`log`] and [`ancestors`]
//! 5. **Branch/Head (Refs)** — lightweight branch pointers via [`RefsTable`]
//! 6. **Diff** — object-level comparison between commits via [`diff()`]
//! 7. **Merge** — 3-way merge with conflict detection/resolution via [`merge()`]
//! 8. **Save** — crash-safe persistence without creating a commit via [`save()`]
//!
//! # Performance (DGX Spark, 10K triples)
//!
//! | Operation | Measured | Gate |
//! |-----------|----------|------|
//! | Commit | ~3ms | < 25ms |
//! | Checkout | ~1.3ms | < 25ms |
//! | Commit+Checkout (H-GIT-1) | ~4.3ms | < 50ms |
//! | Save+Restore (M-SAVE) | ~4.3ms | < 100ms |
//! | Awakening (M-119) | ~1.3ms | < 200ms |
//! | Batch add 10K | ~4.3ms | < 10ms |
//!
//! # Merge Conflict Resolution
//!
//! The [`merge()`] function detects conflicts (same subject+predicate with
//! different objects across branches). Use [`merge_with_strategy`] for
//! automatic resolution via [`MergeStrategy::Ours`], [`MergeStrategy::Theirs`],
//! [`MergeStrategy::LastWriterWins`], or a custom closure.
//!
//! # Crash-Safe Persistence
//!
//! [`save()`] uses a WAL marker + atomic file rename pattern. If a save is
//! interrupted, the previous Parquet files remain valid. [`save_with_options`]
//! adds zstd compression and incremental saves (only dirty namespaces).
pub use ;
pub use checkout;
pub use cherry_pick;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use revert;
pub use ;