2 Commits
Author SHA1 Message Date
Willie 9bdc1b3a22 fix(hooks): Git hook follow-ups from #310 (#317)
* fix(hooks): report inactive Git reasons once and warn on a git account

The inactive reason from #310 was appended to every change message and
also added to the plan warnings, so the CLI and the dashboard preview
showed it twice. Global and project roots on the same old Git added the
same warning twice as well, which the preview uses as a React key. Keep
the reason in inactiveReason and a single deduplicated warning.

The git binding always manages Git config hooks, so an account target
named git silently lost its hooks. Warn when an entry uses that binding;
stay quiet otherwise so doctor does not warn about a valid config.

The planner tests for file decisions and main checkout origins no longer
depend on Git 2.54 now that actions are not relabeled, so they run on
older runners too.

Validation: make check in the devcontainer (Git 2.39.5); each new test
fails without its fix.

* fix(doctor): report missing Git as inactive instead of unsynced

When Git is not installed, Git hook outputs are skipped with an inactive
change. Doctor listed it as "not synced (inactive)" and suggested running
sync, which cannot install Git. Report the reason instead, and only
suggest sync when a change is pending or conflicting.

Validation: make check in the devcontainer; the new integration test
runs doctor with an empty PATH and fails without this fix.
2026-10-02 03:15:44 +08:00
Rusty Shackleford 1a2389dea2 feat(hooks): manage Git config hooks (#310)
Git 2.54 added named config hooks, but keeping their registrations and
helper paths consistent across machines still required manual config
edits. Bring them into the same preview, sync, and recovery workflow as
Agent hooks.

- Global and project scope, with linked worktrees sharing the common dir
- Portable helper files, collision detection, and ownership tracking of
  generated files and include.path entries
- Backups and restore preserve unrelated settings and conditional includes
- Management never executes hooks; Git below 2.54 is reported as inactive
  while outputs are still generated
- CLI/API inventory, raw YAML editing in the dashboard, localized docs
2026-10-02 02:56:54 +08:00