fix(daemon): address review findings

Idle paused loop no longer spins, local snapshots continue during network
backoff, debounce has a maximum wait, sync accepts non-canonical paths, removed
repos are dropped, socket dir mode is enforced. adopt_if_identical now skips
worktrees with staged changes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
dasemuandClaude Sonnet 5.5 committed 2026-11-16 13:05:38 +01:00
1 parent 3f5ef28503
commit 0e77dd26d9
6 files changed
+182 -18

No files matched your search

+4
View File
@@ -119,6 +119,10 @@ fn adopt_if_identical(
stamp: &str,
st: State,
) -> Result<Received, GitError> {
// Anything staged (partial `add -p`, intent-to-add) would be lost by the index reset: skip.
if g.probe(&["diff", "--cached", "--quiet"])?.is_none() {
return Ok(Received::Skipped(st));
}
let worktree_tree = crate::snapshot::worktree_tree(g.dir())?;
let upstream_tree = g.run(&["rev-parse", "@{upstream}^{tree}"])?;
if worktree_tree != upstream_tree {