Problem
When modules init checks out an untracked/pinned module at an exact commit, Git emits the full detached-HEAD advice block:
Note: switching to '<sha>'.
You are in 'detached HEAD' state...
...
HEAD is now at <sha> <subject>
This is technically accurate, but it is noisy and alarming during normal agent-home / desk preparation. The modules tool already prints its own status line, so raw Git advice leaks an implementation detail into the operator-facing setup path.
Desired behavior
modules init should keep its output concise and owned by modules, e.g.:
den: pinned <sha>
fold: tracking main @ <sha>
For pinned detached checkouts, suppress Git's detached-HEAD advice (or use a quieter checkout path) while still failing loudly on real checkout errors.
Context
This surfaced while preparing a fresh desk-scoped junior home. The root cause for junior was fixed separately by marking den and fold as tracking main, but pinned modules remain a valid manifest shape and should not dump raw Git guidance during successful initialization.
Acceptance criteria
- Successful pinned-commit checkout does not print Git's detached-HEAD advice block.
- Real clone/checkout errors remain visible and nonzero.
- Tests cover pinned detached checkout output and tracked-branch checkout output.
Problem
When
modules initchecks out an untracked/pinned module at an exact commit, Git emits the full detached-HEAD advice block:This is technically accurate, but it is noisy and alarming during normal agent-home / desk preparation. The modules tool already prints its own status line, so raw Git advice leaks an implementation detail into the operator-facing setup path.
Desired behavior
modules initshould keep its output concise and owned bymodules, e.g.:For pinned detached checkouts, suppress Git's detached-HEAD advice (or use a quieter checkout path) while still failing loudly on real checkout errors.
Context
This surfaced while preparing a fresh desk-scoped junior home. The root cause for junior was fixed separately by marking
denandfoldas trackingmain, but pinned modules remain a valid manifest shape and should not dump raw Git guidance during successful initialization.Acceptance criteria