Repository navigation
fix: warn when only --delete-excluded is enabled - #8
Merged
Merged
Conversation
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.
--delete-excludeddeletes files on its own — it does not need--delete— but both delete gates only ever checkedflags.delete. A task with just that flag enabled showed no ⚠ in the run confirmation and got no prompt when the flag was switched on, so it could remove files at the destination with nothing warning you.Confirmed against rsync 3.4.3:
rsync -a --delete-excluded --exclude='*.log' src/ dst/, with no--delete, removed both the file missing from the source and the excluded one.Task::destructive()now covers both flags and backs the run confirmation as well as the flag toggle. The toggle alert previously hardcoded--deletein its text and setflags.deletedirectly; it now carries the field index and renders the real flag name, so switching on del-excl prompts for--delete-excluded. The alert fires when a task becomes destructive rather than once per flag, so adding the second delete flag to an already-destructive task does not prompt a second time.The confirmation list reads better too: flags are spelled out in full rather than abbreviated, aligned in a column sized to the widest task name, and the warning line is centred and capitalised.
fmt,clippy -D warnings, build and 71 tests clean.