use std::collections::HashMap;
use std::collections::HashSet;
use crate::jj::types::Signature;
#[derive(Debug, Clone)]
pub struct SegmentCommit {
pub commit_id: String,
pub change_id: String,
pub description: String,
pub author: Signature,
pub committer: Signature,
pub short_change_id: String,
pub files: Vec<String>,
}
#[derive(Debug, Clone)]
pub struct BookmarkSegment {
pub bookmark_names: Vec<String>,
pub change_id: String,
pub commits: Vec<SegmentCommit>,
}
#[derive(Debug, Clone)]
pub struct BranchStack {
pub segments: Vec<BookmarkSegment>,
}
#[derive(Debug)]
pub struct ChangeGraph {
pub adjacency_list: HashMap<String, String>,
pub stack_leaves: HashSet<String>,
#[cfg_attr(
not(test),
expect(dead_code, reason = "available for interactive mode or diagnostics")
)]
pub stack_roots: HashSet<String>,
#[cfg_attr(
not(test),
expect(
dead_code,
reason = "used during graph construction; exposed for diagnostics"
)
)]
pub segments: HashMap<String, BookmarkSegment>,
#[cfg_attr(
not(test),
expect(dead_code, reason = "used in later milestones for diagnostics")
)]
pub tainted_change_ids: HashSet<String>,
pub excluded_bookmark_count: usize,
pub stacks: Vec<BranchStack>,
}