Implement remove, move and copy tree mutations #9
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Objective
Implement
rm/remove/delete,mv/rename, andcp/copyfor entries and directory subtrees.Scope
Acceptance criteria
.gpg-idboundaries, and cancellation.Prerequisites
Safe password-store core; embedded GPG-compatible cryptography; recipient policy.
Implemented in commit
410007cand pushed to main. Added storage-owned rollback-safe remove, move, and copy transactions for entries and complete directory subtrees, including force/confirmation handling, recursive deletion, trailing-slash and existing-directory destination semantics, ambiguity/type-collision rejection, empty-directory preservation, signed nested .gpg-id boundaries, selective OpenPGP reencryption, destination-first durable moves, compatible commit intents, and rollback of source plus overwritten/new destinations on filesystem or commit failure. Unknown auxiliary files and nested Git repositories are rejected before mutation to prevent partial transfers. Added 10 isolated compatibility-fixture tests covering entry and directory operations, forced collisions, cancellation, recursive requirements, directory destinations, ambiguity, recipient changes, empty subtrees, source preservation/removal, and exact-tree rollback. Verified cargo fmt --all -- --check; RUSTFLAGS="-D warnings" cargo check --workspace --all-targets; cargo clippy --workspace --all-targets -- -D warnings; cargo test --workspace.