Skip to main content

ontocore_diff/
refs.rs

1//! Semantic diff ref tokens shared by CLI and LSP.
2
3/// Indexed in-memory catalog (LSP last index). Legacy alias: `WORKSPACE`.
4pub fn is_indexed_catalog_ref(git_ref: &str) -> bool {
5    let upper = git_ref.to_ascii_uppercase();
6    upper == "INDEXED" || upper == "CATALOG" || upper == "WORKSPACE"
7}
8
9/// Filesystem / git worktree catalog (uncommitted or working tree snapshot).
10pub fn is_worktree_ref(git_ref: &str) -> bool {
11    git_ref.eq_ignore_ascii_case("WORKTREE")
12}