[PR #1] [MERGED] Allow passing through unknown rsync arguments #1

Closed
opened 2026-03-07 13:58:03 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/badlogic/rsync-win/pull/1
Author: @badlogic
Created: 2/12/2026
Status: Merged
Merged: 2/12/2026
Merged by: @badlogic

Base: masterHead: passthrough-unknown-args


📝 Commits (1)

  • c506c7d Allow passing through unknown rsync arguments

📊 Changes

1 file changed (+78 additions, -1 deletions)

View changed files

📝 src/main.rs (+78 -1)

📄 Description

This allows rsync-win to act as a transparent wrapper by passing through any arguments it doesn't explicitly recognize to the underlying rsync binary.

Problem: Previously, clap would reject unknown arguments (like --no-group) with an error, even though the underlying cygwin rsync supports them.

Solution:

  1. Try to parse args normally with clap
  2. If that fails, manually separate known flags from unknown ones
  3. Pass unknown args through to rsync

This means users can use any rsync flag without needing to update rsync-win, making it truly transparent except for path conversion and SSH setup.

Fixes issues where users need rsync flags that aren't explicitly defined in the Args struct (e.g., --no-group, --no-owner, etc.).


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/badlogic/rsync-win/pull/1 **Author:** [@badlogic](https://github.com/badlogic) **Created:** 2/12/2026 **Status:** ✅ Merged **Merged:** 2/12/2026 **Merged by:** [@badlogic](https://github.com/badlogic) **Base:** `master` ← **Head:** `passthrough-unknown-args` --- ### 📝 Commits (1) - [`c506c7d`](https://github.com/badlogic/rsync-win/commit/c506c7def18a2e1a92cbaaee3082b320ff6901e5) Allow passing through unknown rsync arguments ### 📊 Changes **1 file changed** (+78 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/main.rs` (+78 -1) </details> ### 📄 Description This allows rsync-win to act as a transparent wrapper by passing through any arguments it doesn't explicitly recognize to the underlying rsync binary. **Problem:** Previously, clap would reject unknown arguments (like `--no-group`) with an error, even though the underlying cygwin rsync supports them. **Solution:** 1. Try to parse args normally with clap 2. If that fails, manually separate known flags from unknown ones 3. Pass unknown args through to rsync This means users can use any rsync flag without needing to update rsync-win, making it truly transparent except for path conversion and SSH setup. Fixes issues where users need rsync flags that aren't explicitly defined in the Args struct (e.g., `--no-group`, `--no-owner`, etc.). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-07 13:58:03 +03:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/rsync-win#1
No description provided.