mirror of
https://github.com/getpaseo/paseo.git
synced 2026-10-27 19:52:49 +00:00
A Git-source install is checked out under `~/.paseo/plugins/<plugin>/<install-id>/checkout`, and `updateSource` deleted that directory once the new install was active. Anything in it that was never pushed went with it: uncommitted files, and commits on a branch or a detached HEAD, which is how the checkout arrives. `removeVersion` now retires the outgoing version root as `<version-root>.old-<timestamp>` instead of removing it. The copy kept by the previous update is reaped first, so one retired root sits beside the active one and they do not accumulate. Uninstalling still deletes the whole plugin root, kept copies included, and a failed preparation or activation still discards its staging candidate without touching the running installation. The retired root is logged at info level so the path is discoverable; the update result keeps its single `warning` field for the case where the old root could not be kept. Regression test: "keeps the previous Git installation and reaps it on the next update" installs from a Git repository, writes into the checkout without committing, applies a reviewed update, and asserts the retired checkout still holds that file. It fails on the previous code (`expected [] to have a length of 1`) and passes here. A second update asserts the older copy is reaped and the newer one is kept. Refs https://github.com/getpaseo/paseo/issues/7904