Skip to main content

cmd_watch

Function cmd_watch 

Source
pub async fn cmd_watch(cli: &Cli, args: WatchArgs) -> Result<()>
Expand description

Top-level entry point. Threading-wise:

  1. Open the repository (canonical path discovery walks parents).
  2. Replay the --since window, emitting in chronological order.
  3. Spawn a notify watcher on the oplog file — the channel sends events into the main loop, which drains pending entries (id > watermark) on each modify and exits cleanly on SIGINT.