The daemon asks the forge (GitHub, Gitea/Forgejo) which pull requests were merged and removes the local worktree and branch of each merged head that holds no local work. Squash/rebase merges and head branches kept on the forge are covered; regenerable ignored output (target/, node_modules...) does not keep a worktree, any other ignored file does. The tip is kept in a refs/sync-backup/<machine>/<stamp>/merged/<branch> ref, and materialize no longer brings a pruned branch back unless it gets new commits. New config: sync.prune_merged (default true) and sync.prune_disposable. See docs/prune-merged.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011GZUAKXXztS4Hy4F4sSRkc
2.8 KiB
Grove
Overview
Linux tool that keeps chosen git repos continuously in sync across machines, including
uncommitted work, via snapshot refs (refs/sync/<machine>/<branch>) on a primary remote.
Rust workspace: grove-core, grove (CLI), grove-daemon (groved), grove-providers (Gitea/Forgejo/GitHub),
grove-gui (native Slint desktop app with a ksni tray, docs/phase7.md). Phases 0-7 are implemented; the real two-PC run passed (docs/two-pc-run.md).
Worktrees merged through a PR on the forge are pruned by the daemon (docs/prune-merged.md).
Do not start new work before the previous results are written to docs/.
Commands
- Check shell scripts:
for f in spikes/*.sh; do bash -n "$f"; done - Throwaway Forgejo (dev only, Podman):
spikes/forgejo-up.sh, thenspikes/phase0.sh - Rust:
cargo fmt --check,cargo clippy --all-targets -- -D warnings,cargo test - Daemon:
cargo run -p grove-daemon --bin groved -- --config PATH; clientgrove daemon status - GUI:
cargo run -p grove-gui(--hiddenstarts in the tray; needs a Wayland/X11 session and a StatusNotifier host) - Package:
cargo build --release --workspace && cargo deb -p grove --no-build - Throwaway e2e on a local Forgejo:
spikes/phase4-e2e.sh
Architecture
See docs/ (phase0-spike.md ... phase7.md, two-pc-run.md, prune-merged.md, DECISIONS.md). Git is the storage layer; shell out to
system git; snapshots use a temp GIT_INDEX_FILE + commit-tree, never touching the
user's branch or index.
Conventions
- Dependencies: serde+toml, clap+anyhow, notify+serde_json, ureq, keyring, age, slint (GUI,
winit+ software renderer) and ksni (tray), approved. Ask before adding more. - Everything in the repo is English. Open questions go to
docs/DECISIONS.md. - Never destroy local work; divergence is surfaced, never auto-merged.
- The daemon manages only bare-layout repos at
root/<group>/<repo>and pushes WIP snapshots only to private repos by default (sync.snapshots, per-group override); seedocs/phase6.md.
Workflow quirks
- Remote: public GitHub
Dasemu/Groveover SSH, CLIgh; PRs targetdevelopmentthere.git.zenvairo.es/dasemu/Groveis a read-only pull mirror of it (never push to it). - In zsh, aliases like
g/ggshadow shell functions; use unusual function names in scripts. - Throwaway repos created on the real Gitea for tests must be deleted afterwards.
Deployment
Native Linux app (systemd user service). Never Docker for deployment.
Gotchas
- Forgejo push mirrors to localhost need
migrations.ALLOW_LOCALNETWORKS(test instances only). - Push-mirror exclusion of
refs/sync/*is verified on Forgejo 11 only, not yet on the real Gitea. - Slint on Wayland: a window shown from an idle (hidden) event loop is not mapped until another event arrives;
show_windowschedules a one-shot redraw. Keep it.