Skip to content

Support filter clear directives - #1306

Merged
oferchen merged 1 commit into
masterfrom
implement-missing-components-for-oc-rsync
Oct 28, 2025
Merged

oferchen merged 1 commit into
masterfrom
implement-missing-components-for-oc-rsync

Conversation

@oferchen

@oferchen oferchen commented Oct 28, 2025 •

Copy link
Copy Markdown
Owner

Summary

  • add a clear filter action that removes existing include/exclude/protect rules for the targeted sides
  • ensure filter clearing respects sender/receiver flags and add regression tests

Testing

  • cargo test -p rsync-filters

@oferchen
oferchen merged commit 315caea into master Oct 28, 2025
@oferchen
oferchen deleted the implement-missing-components-for-oc-rsync branch October 28, 2025 07:36

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/filters/src/lib.rs
Comment on lines 93 to +97
Protect,
/// Remove previously applied protection, allowing deletion when matched.
Risk,
/// Clear previously defined filter rules for the affected transfer sides.
Clear,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P0 Badge Handle new Clear variant across filter program

Adding FilterAction::Clear here breaks existing matches that only covered Include | Exclude and Protect | Risk (e.g. FilterSegment::push_rule and the protect/risk loop in crates/engine/src/local_copy.rs). After this commit the crate no longer compiles because those matches are now non‑exhaustive. Extend the engine’s match statements to handle Clear (and implement the clearing behaviour) before merging.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant