Skip to content

Expose whole-file option through CLI and client config - #910

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

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

Conversation

@oferchen

@oferchen oferchen commented Oct 22, 2025 •

Copy link
Copy Markdown
Owner

Summary

  • plumb the --whole-file/--no-whole-file toggles through the CLI parser, help, and remote fallback shim
  • store the whole-file preference on ClientConfig with builder accessors and default behaviour mirroring upstream
  • extend parsing and remote fallback tests to cover the new option

Testing

  • cargo test

@oferchen
oferchen merged commit 41d4548 into master Oct 22, 2025
@oferchen
oferchen deleted the implement-missing-components-for-oc-rsync-qqrrgu branch October 22, 2025 21:28
oferchen added a commit that referenced this pull request Jun 11, 2026
…sing-args

The sender side already emits a mode-0 sentinel file-list entry per
upstream flist.c:2254-2258 when --delete-missing-args is in effect.
PR #5523 added the matching receiver consumer, but PR #5541 (merged
four hours later from a branch that pre-dated #5523) inadvertently
deleted both `missing_args.rs` and its wire-up in the receiver
transfer paths.

Mode-0 entries are neither file, directory, symlink, nor special, so
the existing create/transfer passes silently skip them, leaving the
named destination path untouched. The upstream testsuite test
`delete-missing-args-files-from` (issue #910) surfaces this as
"missing-arg file ghost.txt was not deleted on the receiver" with a
clean exit code 0.

Restore the dedicated handler that mirrors upstream
generator.c:1348-1354 (missing_args == 2 && file->mode == 0):
iterate the file list once after directory/symlink creation but before
the extraneous-delete sweep, remove the named destination path when it
exists, and skip any further creation for that entry. Deletions route
through the existing sandbox helpers (unlink_via_sandbox_or_fallback /
recursive_unlinkat_via_sandbox_or_fallback) so the SEC-1.q TOCTOU
guarantees still apply. dry_run and the absence of
--delete-missing-args short-circuit the pass, matching upstream's
statret guard and missing_args mode check.

Wired into all three receiver transfer drivers (`run_pipelined`,
`run_pipelined_incremental`, and `run_sync`) so the handler runs
regardless of feature flags or fallback path.

Regression coverage exercises the receiver against a real on-disk
destination through both the wire-flist consume path
(receive_file_list) and direct file_list construction, covering: file
deletion, directory recursive removal, missing-destination no-op,
dry-run skip, and the no-op when --delete-missing-args is off.

upstream: generator.c:1348-1354 missing_args == 2 && file->mode == 0
upstream: flist.c:2254-2258 sender mode-0 sentinel emission
oferchen added a commit that referenced this pull request Jun 11, 2026
…sing-args

The sender side already emits a mode-0 sentinel file-list entry per
upstream flist.c:2254-2258 when --delete-missing-args is in effect.
PR #5523 added the matching receiver consumer, but PR #5541 (merged
four hours later from a branch that pre-dated #5523) inadvertently
deleted both `missing_args.rs` and its wire-up in the receiver
transfer paths.

Mode-0 entries are neither file, directory, symlink, nor special, so
the existing create/transfer passes silently skip them, leaving the
named destination path untouched. The upstream testsuite test
`delete-missing-args-files-from` (issue #910) surfaces this as
"missing-arg file ghost.txt was not deleted on the receiver" with a
clean exit code 0.

Restore the dedicated handler that mirrors upstream
generator.c:1348-1354 (missing_args == 2 && file->mode == 0):
iterate the file list once after directory/symlink creation but before
the extraneous-delete sweep, remove the named destination path when it
exists, and skip any further creation for that entry. Deletions route
through the existing sandbox helpers (unlink_via_sandbox_or_fallback /
recursive_unlinkat_via_sandbox_or_fallback) so the SEC-1.q TOCTOU
guarantees still apply. dry_run and the absence of
--delete-missing-args short-circuit the pass, matching upstream's
statret guard and missing_args mode check.

Wired into all three receiver transfer drivers (`run_pipelined`,
`run_pipelined_incremental`, and `run_sync`) so the handler runs
regardless of feature flags or fallback path.

Regression coverage exercises the receiver against a real on-disk
destination through both the wire-flist consume path
(receive_file_list) and direct file_list construction, covering: file
deletion, directory recursive removal, missing-destination no-op,
dry-run skip, and the no-op when --delete-missing-args is off.

upstream: generator.c:1348-1354 missing_args == 2 && file->mode == 0
upstream: flist.c:2254-2258 sender mode-0 sentinel emission
oferchen added a commit that referenced this pull request Jun 11, 2026
…sing-args

The sender side already emits a mode-0 sentinel file-list entry per
upstream flist.c:2254-2258 when --delete-missing-args is in effect.
PR #5523 added the matching receiver consumer, but PR #5541 (merged
four hours later from a branch that pre-dated #5523) inadvertently
deleted both `missing_args.rs` and its wire-up in the receiver
transfer paths.

Mode-0 entries are neither file, directory, symlink, nor special, so
the existing create/transfer passes silently skip them, leaving the
named destination path untouched. The upstream testsuite test
`delete-missing-args-files-from` (issue #910) surfaces this as
"missing-arg file ghost.txt was not deleted on the receiver" with a
clean exit code 0.

Restore the dedicated handler that mirrors upstream
generator.c:1348-1354 (missing_args == 2 && file->mode == 0):
iterate the file list once after directory/symlink creation but before
the extraneous-delete sweep, remove the named destination path when it
exists, and skip any further creation for that entry. Deletions route
through the existing sandbox helpers (unlink_via_sandbox_or_fallback /
recursive_unlinkat_via_sandbox_or_fallback) so the SEC-1.q TOCTOU
guarantees still apply. dry_run and the absence of
--delete-missing-args short-circuit the pass, matching upstream's
statret guard and missing_args mode check.

Wired into all three receiver transfer drivers (`run_pipelined`,
`run_pipelined_incremental`, and `run_sync`) so the handler runs
regardless of feature flags or fallback path.

Regression coverage exercises the receiver against a real on-disk
destination through both the wire-flist consume path
(receive_file_list) and direct file_list construction, covering: file
deletion, directory recursive removal, missing-destination no-op,
dry-run skip, and the no-op when --delete-missing-args is off.

upstream: generator.c:1348-1354 missing_args == 2 && file->mode == 0
upstream: flist.c:2254-2258 sender mode-0 sentinel emission
oferchen added a commit that referenced this pull request Jun 11, 2026
…sing-args (#5681)

The sender side already emits a mode-0 sentinel file-list entry per
upstream flist.c:2254-2258 when --delete-missing-args is in effect.
PR #5523 added the matching receiver consumer, but PR #5541 (merged
four hours later from a branch that pre-dated #5523) inadvertently
deleted both `missing_args.rs` and its wire-up in the receiver
transfer paths.

Mode-0 entries are neither file, directory, symlink, nor special, so
the existing create/transfer passes silently skip them, leaving the
named destination path untouched. The upstream testsuite test
`delete-missing-args-files-from` (issue #910) surfaces this as
"missing-arg file ghost.txt was not deleted on the receiver" with a
clean exit code 0.

Restore the dedicated handler that mirrors upstream
generator.c:1348-1354 (missing_args == 2 && file->mode == 0):
iterate the file list once after directory/symlink creation but before
the extraneous-delete sweep, remove the named destination path when it
exists, and skip any further creation for that entry. Deletions route
through the existing sandbox helpers (unlink_via_sandbox_or_fallback /
recursive_unlinkat_via_sandbox_or_fallback) so the SEC-1.q TOCTOU
guarantees still apply. dry_run and the absence of
--delete-missing-args short-circuit the pass, matching upstream's
statret guard and missing_args mode check.

Wired into all three receiver transfer drivers (`run_pipelined`,
`run_pipelined_incremental`, and `run_sync`) so the handler runs
regardless of feature flags or fallback path.

Regression coverage exercises the receiver against a real on-disk
destination through both the wire-flist consume path
(receive_file_list) and direct file_list construction, covering: file
deletion, directory recursive removal, missing-destination no-op,
dry-run skip, and the no-op when --delete-missing-args is off.

upstream: generator.c:1348-1354 missing_args == 2 && file->mode == 0
upstream: flist.c:2254-2258 sender mode-0 sentinel emission
oferchen added a commit that referenced this pull request Aug 24, 2026
…sing-args (#5681)

The sender side already emits a mode-0 sentinel file-list entry per
upstream flist.c:2254-2258 when --delete-missing-args is in effect.
PR #5523 added the matching receiver consumer, but PR #5541 (merged
four hours later from a branch that pre-dated #5523) inadvertently
deleted both `missing_args.rs` and its wire-up in the receiver
transfer paths.

Mode-0 entries are neither file, directory, symlink, nor special, so
the existing create/transfer passes silently skip them, leaving the
named destination path untouched. The upstream testsuite test
`delete-missing-args-files-from` (issue #910) surfaces this as
"missing-arg file ghost.txt was not deleted on the receiver" with a
clean exit code 0.

Restore the dedicated handler that mirrors upstream
generator.c:1348-1354 (missing_args == 2 && file->mode == 0):
iterate the file list once after directory/symlink creation but before
the extraneous-delete sweep, remove the named destination path when it
exists, and skip any further creation for that entry. Deletions route
through the existing sandbox helpers (unlink_via_sandbox_or_fallback /
recursive_unlinkat_via_sandbox_or_fallback) so the SEC-1.q TOCTOU
guarantees still apply. dry_run and the absence of
--delete-missing-args short-circuit the pass, matching upstream's
statret guard and missing_args mode check.

Wired into all three receiver transfer drivers (`run_pipelined`,
`run_pipelined_incremental`, and `run_sync`) so the handler runs
regardless of feature flags or fallback path.

Regression coverage exercises the receiver against a real on-disk
destination through both the wire-flist consume path
(receive_file_list) and direct file_list construction, covering: file
deletion, directory recursive removal, missing-destination no-op,
dry-run skip, and the no-op when --delete-missing-args is off.

upstream: generator.c:1348-1354 missing_args == 2 && file->mode == 0
upstream: flist.c:2254-2258 sender mode-0 sentinel emission
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