Skip to main content

worktrees_differ

Function worktrees_differ 

Source
pub fn worktrees_differ(old: &[JsonWorktree], new: &[JsonWorktree]) -> bool
Expand description

True when two worktree snapshots differ in a way a subscribe client should be notified about.

Deliberately excludes age_seconds: it is recomputed from the current time on every poll, so for any non-trunk branch it ticks up each second. Comparing it (a naive old != new) would fire a spurious worktrees.changed on every poll, breaking the documented “one per detected change” contract. Every other field is compared.