-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
Currently, when running dotctl save, the tool saves dotfiles and configs listed in dotctl.yaml, but it does not remove previously saved files that were removed from the config.
This causes the .dot repository to accumulate stale or outdated files that are no longer being tracked in the latest config.
🔍 Steps to Reproduce:
- Add a config path
~/.bashrctodotctl.yaml - Run
dotctl save→ saves.bashrcto the dot repo - Remove
~/.bashrcfromdotctl.yaml - Run
dotctl saveagain .bashrcstill exists in the dot repo
✅ Expected Behavior:
dotctl save should:
- Detect and remove previously saved files in the dot repo that are no longer present in dotctl.yaml
- Optionally log or warn about removed files for user awareness
💡 Suggested Fix:
During the save operation:
- Track the list of already saved paths (maybe in a cache file or scanning the dot repo)
- Compare against the current list in
dotctl.yaml - Remove any entries not in the config
- Optionally support a
--pruneflag if user wants to control this behavior
📌 Feature Summary:
- Compare previously saved paths vs current
dotctl.yaml - Remove orphaned files from the dot repo
- Add optional
--pruneor config flag to toggle this behavior - Log removals for transparency
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels