Problem
init does two things (per its own description — "run install-hooks, then silence the 'embedded git repository' advice"):
- installs the per-repo hooks, and
- sets
git config advice.addEmbeddedRepo false (src/api/cli/init.mjs:18).
But removal only undoes the first. uninstall-hooks removes the hook scripts and nothing else, and there is no deinit command. So after uninstalling, advice.addEmbeddedRepo=false is left behind in the repo's local config — which means git's "adding embedded git repository" warning stays permanently silenced even though git-embedded is gone.
That warning is precisely the safety net you want back once the tool is removed: it's what catches an accidental git add of a nested checkout as a stray gitlink. Leaving it off is the worst-direction failure — silent.
Reproduce
git-embedded init # installs hooks + sets advice.addEmbeddedRepo=false
git-embedded uninstall-hooks
git config --local --get advice.addEmbeddedRepo # → false (still set; should be gone)
Confirmation
init.mjs:18 sets advice.addEmbeddedRepo false.
- No source path unsets/restores it (grep for
unset / addEmbeddedRepo across src/ finds only the setter and unrelated registry getters).
- Command surface is
doctor / export / init / install-hooks / install-template / link / print-hook-script / record / restore / sync / uninstall-hooks / version / help — no deinit / full uninstall.
Suggested fix
Make removal symmetric with init. Preferably add a deinit command (the mirror of init) that:
- runs
uninstall-hooks, and
- restores the advice —
git config --local --unset advice.addEmbeddedRepo (guard: only unset when the local value is false, i.e. what init would have set, so a user's deliberate setting isn't clobbered).
Alternatively (or additionally), have uninstall-hooks unset the advice config too, or at minimum print a warning that it left advice.addEmbeddedRepo=false behind and how to restore it.
Workaround (what removal currently requires by hand)
git-embedded uninstall-hooks
git config --local --unset advice.addEmbeddedRepo
Encountered while removing git-embedded from a parent workspace repo: uninstall-hooks cleared the hooks but left the advice silenced, so the embedded-repo warning had to be restored manually.
Problem
initdoes two things (per its own description — "run install-hooks, then silence the 'embedded git repository' advice"):git config advice.addEmbeddedRepo false(src/api/cli/init.mjs:18).But removal only undoes the first.
uninstall-hooksremoves the hook scripts and nothing else, and there is nodeinitcommand. So after uninstalling,advice.addEmbeddedRepo=falseis left behind in the repo's local config — which means git's "adding embedded git repository" warning stays permanently silenced even though git-embedded is gone.That warning is precisely the safety net you want back once the tool is removed: it's what catches an accidental
git addof a nested checkout as a stray gitlink. Leaving it off is the worst-direction failure — silent.Reproduce
Confirmation
init.mjs:18setsadvice.addEmbeddedRepo false.unset/addEmbeddedRepoacrosssrc/finds only the setter and unrelated registry getters).doctor / export / init / install-hooks / install-template / link / print-hook-script / record / restore / sync / uninstall-hooks / version / help— nodeinit/ fulluninstall.Suggested fix
Make removal symmetric with
init. Preferably add adeinitcommand (the mirror ofinit) that:uninstall-hooks, andgit config --local --unset advice.addEmbeddedRepo(guard: only unset when the local value isfalse, i.e. whatinitwould have set, so a user's deliberate setting isn't clobbered).Alternatively (or additionally), have
uninstall-hooksunset the advice config too, or at minimum print a warning that it leftadvice.addEmbeddedRepo=falsebehind and how to restore it.Workaround (what removal currently requires by hand)
Encountered while removing git-embedded from a parent workspace repo:
uninstall-hookscleared the hooks but left the advice silenced, so the embedded-repo warning had to be restored manually.