Add to argument exclusions for dry-run #1000

Closed
sean-wallace wants to merge 1 commits from sean-wallace/borgmatic:fix-filter-bug into main
First-time contributor

Fixes #999

Fixes #999
sean-wallace added 1 commit 2025-02-17 22:31:05 +00:00
sean-wallace requested review from witten 2025-02-17 22:31:25 +00:00
Owner

Thanks for taking the time to submit a PR for this! Here's a potential edge case though that makes borgmatic's simple approach to Borg flag exclusion not work here: --filter AME (as opposed to --filter=AME) is valid for Borg—and in fact is the documented way to pass flags with values. It looks like Borg does still accepts --filter=AME, but there's not guarantee a user will include that equals sign. So unfortunately I think any attempt to exclude this flag will have to be a bit smarter and, worst case, will even need to use something like argparse.

Thanks for taking the time to submit a PR for this! Here's a potential edge case though that makes borgmatic's simple approach to Borg flag exclusion not work here: `--filter AME` (as opposed to `--filter=AME`) is valid for Borg—and in fact is the documented way to pass flags with values. It looks like Borg does still accepts `--filter=AME`, but there's not guarantee a user will include that equals sign. So unfortunately I think any attempt to exclude this flag will have to be a bit smarter and, worst case, will even need to use something like `argparse`.
Author
First-time contributor

Ah, that's a good point! Yes, it's definitely a bit more complicated than this simple approach. I may come back and make an attempt with argparse later, but mostly I think I'll just live with the limitation for the time being. Thanks again.

Ah, that's a good point! Yes, it's definitely a bit more complicated than this simple approach. I may come back and make an attempt with argparse later, but mostly I think I'll just live with the limitation for the time being. Thanks again.
Owner

Okay, I'll close this PR for now and one of us will hopefully give it another go. 😄

Okay, I'll close this PR for now and one of us will hopefully give it another go. 😄
witten closed this pull request 2025-02-22 06:39:45 +00:00

Pull request closed

Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: borgmatic-collective/borgmatic#1000