feat: add structured per-file change output model (-i, --list-only, --out-format, --log-file-format)
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).
This commit is contained in:
@@ -390,6 +390,10 @@ static const OptionEntry OPTION_TABLE[] = {
|
||||
{"--fsync", NULL, OPT_FLAG, offsetof(Config, use_fsync)},
|
||||
{"--checksum", NULL, OPT_FLAG, offsetof(Config, checksum)},
|
||||
{"--8-bit-output", "-8", OPT_FLAG, offsetof(Config, eight_bit_output)},
|
||||
{"--itemize-changes", "-i", OPT_FLAG, offsetof(Config, itemize_changes)},
|
||||
{"--list-only", NULL, OPT_FLAG, offsetof(Config, list_only)},
|
||||
{"--out-format", NULL, OPT_STRING, offsetof(Config, out_format)},
|
||||
{"--log-file-format", NULL, OPT_STRING, offsetof(Config, log_file_format)},
|
||||
{"--existing", NULL, OPT_FLAG, offsetof(Config, existing)},
|
||||
{"--ignore-existing", NULL, OPT_FLAG, offsetof(Config, ignore_existing)},
|
||||
{"--chmod", NULL, OPT_STRING, offsetof(Config, chmod_spec)},
|
||||
|
||||
Reference in New Issue
Block a user