Phase 2: implement -i/--list-only/--out-format/--log-file-format #263

Closed
TapTap wants to merge 0 commits from feat/p2-itemize-output into dev
Owner

Adds a client-side structured per-file change model (new src/client/change_list.[ch]): -i/--itemize-changes, --list-only, --out-format, --log-file-format, emitted from the single sender thread in both modes. Client-only; no wire change. New unit suite test_change_list + parse tests; integration TestListOnly/TestItemizeChanges/TestOutFormat/TestLogFileFormat incl. -m. c-review APPROVE WITH NITS, nits fixed (incl. Summary recount).

Adds a client-side structured per-file change model (new src/client/change_list.[ch]): `-i`/`--itemize-changes`, `--list-only`, `--out-format`, `--log-file-format`, emitted from the single sender thread in both modes. Client-only; no wire change. New unit suite test_change_list + parse tests; integration TestListOnly/TestItemizeChanges/TestOutFormat/TestLogFileFormat incl. `-m`. c-review APPROVE WITH NITS, nits fixed (incl. Summary recount).
TapTap added 2 commits 2026-09-06 12:51:03 +02:00
Implement rsync-style itemized output backed by one shared change-event
engine (src/client/change_list.c):
- -i/--itemize-changes prints ">f+++++++++ <path>" for files actually sent
  (single-threaded and -m); unchanged files print nothing.
- --list-only prints an ls-style listing of files that would be transferred
  without contacting the server or writing anything.
- --out-format=FORMAT prints a printf-style template per changed file
  (tokens %%f %%n %%l %%b %%M %%%%; unknown escapes preserved).
- --log-file-format=FMT logs each transferred file when --log-file is set.
Events are emitted from the per-file sender path shared by both transfer
modes, so the single sender thread is the only reporter (no races).
docs: clarify %b semantics, temper thread-safety claim, harden %M scan; add -m coverage
CI / lint (pull_request) Successful in 20s
CI / sanitizers (undefined) (pull_request) Successful in 41s
CI / sanitizers (address) (pull_request) Successful in 41s
CI / fuzz-build (pull_request) Successful in 16s
CI / coverage (pull_request) Successful in 35s
CI / build-and-test (pull_request) Successful in 1m22s
CI / valgrind (pull_request) Successful in 36s
1b67f5ffcf
Address c-review nits on the itemize/output feature:
- RSYNC_COMPAT.md: state that %b is the source length (always == %l) because
  no wire-byte counter exists; keep Summary equal to the matrix (recounted:
  54 implemented / 84 not-implemented, 147 rows total - four rows flipped).
- change_list.h/.c: document bytes_sent == size; note itemize/out-format lines
  never interleave with each other but may interleave with legacy log
  messages sharing the stream; mark the %M stat() path best-effort.
- change_render_format scan in format_uses_mtime now mirrors the tokenizer
  (skips '%%' and unknown '%X' pairs) so a literal '%%M' no longer triggers
  the stat() fallback.
- Integration tests: --list-only under -m; a changed file on a second
  --incremental run emits exactly one '>f' line while unchanged files print
  nothing; --log-file + --log-file-format under -m.
Author
Owner

Merged into dev via commit 88ab4f6.

Implemented and merged to dev (88ab4f6). Independent c-review: APPROVE WITH NITS; nits fixed (%b honesty docs, tempered thread-safety claim, %% scan fix, -m list-only/log-file-format + single-emission tests, Summary recount). dev CI run #466 all green. Closing as merged.

**Merged into dev** via commit 88ab4f6. Implemented and merged to dev (88ab4f6). Independent c-review: APPROVE WITH NITS; nits fixed (%b honesty docs, tempered thread-safety claim, %% scan fix, -m list-only/log-file-format + single-emission tests, Summary recount). dev CI run #466 all green. Closing as merged.
TapTap closed this pull request 2026-09-06 12:59:20 +02:00

Pull request closed

This pull request cannot be reopened because the branch was deleted.
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: TapTap/FastSync#263