Skip to content

fix: apply upstream option interactions when --files-from is active - #2762

Merged
oferchen merged 3 commits into
masterfrom
fix/files-from-interop
Mar 20, 2026
Merged

oferchen merged 3 commits into
masterfrom
fix/files-from-interop

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

  • When --files-from is specified, upstream rsync (options.c:2169-2188) applies three option interactions that we were missing:
    1. Recursion disabled (recurse = 0)
    2. xfer_dirs enabled (xfer_dirs = 1)
    3. Relative paths enabled by default (relative_paths = 1)
  • Server flag string builder now computes effective recursive/relative flags accounting for --files-from
  • Fixes the --files-from interop test failure (exit 23)

Test plan

  • CI interop tests pass (especially --files-from test case)
  • All required CI checks pass (fmt, clippy, nextest, Windows, macOS, musl)

When --files-from is specified, upstream rsync (options.c:2169-2188)
applies three option interactions:
1. Recursion disabled (recurse = 0)
2. xfer_dirs enabled (xfer_dirs = 1)
3. Relative paths enabled by default (relative_paths = 1)

Additionally, the server flag string builder now accounts for
--files-from when computing effective recursive/relative flags,
and the file list builder emits implied directory entries for
paths with separators instead of a root "." entry.
@github-actions github-actions Bot added the bug Something isn't working label Mar 17, 2026
upstream: options.c:2176-2177 sets xfer_dirs=1 when files_from is
active, allowing individual file transfer without recursion.
upstream: options.c:2187-2188 implies --relative when --files-from is
active, so subdir/nested.txt is preserved at dest/subdir/nested.txt.
@oferchen
oferchen merged commit 14caa9c into master Mar 20, 2026
17 of 31 checks passed
@oferchen
oferchen deleted the fix/files-from-interop branch March 20, 2026 08:12
oferchen added a commit that referenced this pull request May 1, 2026
…2762)

* fix: apply upstream option interactions when --files-from is active

When --files-from is specified, upstream rsync (options.c:2169-2188)
applies three option interactions:
1. Recursion disabled (recurse = 0)
2. xfer_dirs enabled (xfer_dirs = 1)
3. Relative paths enabled by default (relative_paths = 1)

Additionally, the server flag string builder now accounts for
--files-from when computing effective recursive/relative flags,
and the file list builder emits implied directory entries for
paths with separators instead of a root "." entry.

* fix: enable xfer_dirs when --files-from is active

upstream: options.c:2176-2177 sets xfer_dirs=1 when files_from is
active, allowing individual file transfer without recursion.

* test: fix files-from nested test to expect --relative path preservation

upstream: options.c:2187-2188 implies --relative when --files-from is
active, so subdir/nested.txt is preserved at dest/subdir/nested.txt.
oferchen added a commit that referenced this pull request May 5, 2026
…2762)

* fix: apply upstream option interactions when --files-from is active

When --files-from is specified, upstream rsync (options.c:2169-2188)
applies three option interactions:
1. Recursion disabled (recurse = 0)
2. xfer_dirs enabled (xfer_dirs = 1)
3. Relative paths enabled by default (relative_paths = 1)

Additionally, the server flag string builder now accounts for
--files-from when computing effective recursive/relative flags,
and the file list builder emits implied directory entries for
paths with separators instead of a root "." entry.

* fix: enable xfer_dirs when --files-from is active

upstream: options.c:2176-2177 sets xfer_dirs=1 when files_from is
active, allowing individual file transfer without recursion.

* test: fix files-from nested test to expect --relative path preservation

upstream: options.c:2187-2188 implies --relative when --files-from is
active, so subdir/nested.txt is preserved at dest/subdir/nested.txt.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant