Skip to content

fix: match upstream letter order in server flag string#6857

Merged
oferchen merged 1 commit into
masterfrom
fix/server-flag-string-order
Jul 22, 2026
Merged

fix: match upstream letter order in server flag string#6857
oferchen merged 1 commit into
masterfrom
fix/server-flag-string-order

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

  • build_server_flag_string packed the compact single-letter server flag
    bundle (e.g. -logDtpr) in an order that diverged from upstream
    server_options() (options.c:2619-2723): flags like z, H, N, and the
    A/X block were emitted far out of upstream's sequence relative to
    b/u/n/d/W.
  • A real rsync server dispatches each letter independently, so this never
    broke interop, but wire fidelity means our client's own --server argv
    should be byte-for-byte indistinguishable from upstream's own client.
  • Reordered the pushes to follow upstream's exact sequence: v, q, b, u, n, l, d, W, H, o, g, D, t, U, N, p, A, X, r, c, C, I, R, x, S, z.
  • Added a golden test (server_flag_string_matches_upstream_letter_order)
    pinning the full letter order across one flag from each upstream grouping.

Test plan

  • cargo fmt -p core -- --check
  • cargo clippy -p core --all-targets --all-features --no-deps -- -D warnings
  • cargo nextest run -p core --all-features -E 'test(server_flag_string) or test(server_option) or test(server_arg)' (45 passed)

build_server_flag_string packed the compact single-letter server
flag bundle (-logDtpr...) in an order that diverged from upstream
server_options() (options.c:2619-2723). A real rsync server parses
each byte independently so this never broke interop, but wire
fidelity means the client's own argv should be byte-for-byte
indistinguishable from upstream's. Reorder the pushes to follow
upstream's exact sequence (v, q, b, u, n, l, d, W, H, o, g, D, t, U,
N, p, A, X, r, c, C, I, R, x, S, z) and add a golden test pinning the
full letter order.
@github-actions github-actions Bot added the bug Something isn't working label Jul 22, 2026
@oferchen
oferchen merged commit 19fabdc into master Jul 22, 2026
63 checks passed
@oferchen
oferchen deleted the fix/server-flag-string-order branch July 22, 2026 19:26
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