Repository navigation
fix(doctor): hint how to finish a hopspace move Windows refuses - #151
Merged
Merged
Conversation
- advanced usage "Orphaned Resources": prune claimed to clean up orphaned containers and volumes; it drops state, hop.json, ports and volumes records only, never runs Docker, never deletes volume directories - real cleanup paths: git hop env stop before removal, docker compose -p <project> down (compose ls --all once the entry is gone), remove --delete-volumes for hub volume data - prune reference: containers never went through env gc - workflows, FAQ: "prune orphaned hopspaces" -> records; stop the environment before remove in the end-to-end example
- hopspace hooks dir written under its hopspace's hop.json.lock, the lock doctor --fix moves hooks dirs and hopspaces under: a move waits for the hooks being written and carries them; a mirror waits for a move - decide first, write after: every hook decided (prompts included) and hooks dir resolved (git config) before the lock; lock held only around mkdir + writes; nothing under it runs git, a hook or git-hop - dir moved away while waiting (hooks dir gone, or hopspace emptied): nothing written at the old path; dir resolved again, bounded retries, then warning + re-mirror hint - destination re-checked under the lock: identical -> already-present; different -> kept with warning unless --hooks-overwrite or a prompt answered for an existing hook - prompt EOF / read error: hooks answered before it still mirrored - docs: hooks mirroring lock, doctor legacy hooks move waits for a mirror
- known limitation, documented: hopspace layout move renames the dir while holding its lock files open inside it; Windows refuses the rename -> failed repair, nothing moved or lost; untested there - on Windows the failed repair adds a hint: close other git-hop processes, move <from> to <to> by hand - no hint for the move's own refusals (destination taken, source gone) or on other systems - GOOS injectable for tests - docs: doctor section, configuration locks
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
docs: prune drops records only; never stops or removes containers
containers and volumes; it drops state, hop.json, ports and volumes
records only, never runs Docker, never deletes volume directories
down (compose ls --all once the entry is gone), remove
--delete-volumes for hub volume data
environment before remove in the end-to-end example
fix(hooks): mirror committed hooks under the hopspace's hop.json lock
doctor --fix moves hooks dirs and hopspaces under: a move waits for the
hooks being written and carries them; a mirror waits for a move
hooks dir resolved (git config) before the lock; lock held only around
mkdir + writes; nothing under it runs git, a hook or git-hop
nothing written at the old path; dir resolved again, bounded retries,
then warning + re-mirror hint
different -> kept with warning unless --hooks-overwrite or a prompt
answered for an existing hook
fix(doctor): hint how to finish a hopspace move Windows refuses
holding its lock files open inside it; Windows refuses the rename ->
failed repair, nothing moved or lost; untested there
move to by hand
on other systems
Test plan
go test ./...,go vet,gofmt,staticcheckgreen locally before rebase onto current main