fix(init): suppress detached-HEAD advice for pinned modules (#50)#56
Open
olavostauros wants to merge 1 commit into
Open
fix(init): suppress detached-HEAD advice for pinned modules (#50)#56olavostauros wants to merge 1 commit into
olavostauros wants to merge 1 commit into
Conversation
…ckLabs#50) Add -c advice.detachedHead=false to the git checkout call so pinned-module checkout during modules init does not print Git's verbose detached-HEAD advice block. Also add a pinned status line matching the tracked format. Tracked modules already use -q (quiet) checkouts and are unaffected. Real checkout errors (invalid SHA, corrupt object) still surface through the fatal: prefix. Closes KnickKnackLabs#50
olavostauros
force-pushed
the
fix/suppress-detached-advice
branch
from
June 26, 2026 17:24
148277b to
7b1cc80
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add
-c advice.detachedHead=falseto thegit checkout "\$pin"call in.mise/tasks/initso pinned-module checkout duringmodules initdoes not print Git's verbose detached-HEAD advice block.Also adds a
pinned <sha>status line for pinned modules (matching the tracked module formattracking main @ <sha>), keeping output symmetrical and owned bymodules.Tracked modules already use
-q(quiet) checkouts and are unaffected.Design decision
The issue (
#50) suggested the output format:This was chosen over two alternatives:
pinned @ abc1234tracking main @ abc1234where@separates branch from SHA; pinned has no branch, so@reads oddlypinned abc1234Changes
.mise/tasks/init-c advice.detachedHead=falseto pinned checkout + printspinned <sha>on successtest/init.batsValidation
mise run test— 137/137 passingcodebase lint "\$PWD"git diff --check