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
//! The worktree operation layer (issue #95).
//!
//! [`Workspace`] is the public, stateless surface: discovered from a
//! directory, it enumerates, creates, and removes worktrees and reads their
//! `wt.*` metadata with **no prompting, no terminal, and no
//! [`Cx`](crate::cx::Cx)** — outcomes and warnings are returned as data and the
//! caller decides how (or whether) to present them. The `wt` CLI and TUI are
//! thin interactive wrappers over this module; embedders (karet) call it
//! directly and must resolve worktree paths through it rather than
//! reimplementing the `.wt.toml` layout rules.
//!
//! `rows` is the crate-internal row assembly on top: enriched listing rows,
//! worktree-less branch rows (issue #47), sorting, and the remove/prune guard
//! evaluation shared by the CLI and TUI.
//!
//! Every type reachable through the public API is re-exported here. A doctest
//! compiles as its own crate, so this one fails exactly when an embedder could
//! not name what [`CreatedWorktree`] and [`RemovedWorktree`] hand back — which
//! a crate-internal test cannot catch, since `service` is visible in-crate:
//!
//! ```
//! use wt::worktree::{
//! CreatedWorktree, HookOutcome, RemovedWorktree, SubmoduleSeeding, SubmodulesOutcome,
//! };
//!
//! fn inspect(created: &CreatedWorktree, removed: &RemovedWorktree) {
//! let _: &SubmoduleSeeding = &created.submodule_seeding;
//! let _: &SubmodulesOutcome = &created.submodules;
//! let _: &HookOutcome = &created.post_create;
//! let _: &HookOutcome = &removed.pre_remove;
//! }
//! ```
pub
pub
pub use crateSCHEMA_VERSION;
// The row/guard helpers and the parts-based service entry points are how the
// command handlers and the TUI drive this module; the core library's public
// surface is the `Workspace` API and the re-exported schema/lock types.
pub use ;
// The synchronous branch-row listing and base-first sort exist for the TUI
// (issue #47).
pub use ;
pub use ;
pub use ;