Skip to content

fix(cli): never reset bind-mounted plugins in catchup - #38

Open
ducks wants to merge 1 commit into
mainfrom
fix/catchup-bind-mounts
Open

ducks wants to merge 1 commit into
mainfrom
fix/catchup-bind-mounts

Conversation

@ducks

@ducks ducks commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

catchup hard-reset every directory under plugins/ with a .git. A plugin bind-mounted with dv new --plugin-local is the host's checkout, so git reset --hard and git clean -df inside the container deleted uncommitted work on the host. The prompt listed it like any cloned plugin, so nothing warned that the reset reached outside the container.

Reproduce on main: dv new --plugin-local ~/work/my-plugin, edit a file in ~/work/my-plugin without committing, dv catchup -y. The edit is gone from the host.

catchup now inspects the container's mounts and leaves any plugin whose directory is a mount destination out of the reset, listing it in the prompt (and in the -y log) as left alone. Everything it can still reset lives inside the container.

catchup hard-reset every directory under plugins/ with a .git. A plugin
bind-mounted with `dv new --plugin-local` is the host's checkout, so
`git reset --hard` and `git clean -df` inside the container deleted
uncommitted work on the host. The prompt listed it like any cloned
plugin, so nothing warned that the reset reached outside the container.

Reproduce on main: `dv new --plugin-local ~/work/my-plugin`, edit a
file in ~/work/my-plugin without committing, `dv catchup -y`. The edit
is gone from the host.

catchup now inspects the container's mounts and leaves any plugin whose
directory is a mount destination out of the reset, listing it in the
prompt (and in the -y log) as left alone. Everything it can still reset
lives inside the container.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant