From 845f20a28dcd6fced0229cb888aa30008f711f42 Mon Sep 17 00:00:00 2001 From: TapTap Date: Wed, 16 Sep 2026 23:30:26 +0200 Subject: [PATCH] docs(delete): describe per-directory timing in usage and config comments --- src/client/usage.c | 8 ++++---- src/shared/config.h | 16 ++++++++++------ 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/client/usage.c b/src/client/usage.c index 6a79632..6e06d6d 100644 --- a/src/client/usage.c +++ b/src/client/usage.c @@ -66,11 +66,11 @@ void print_usage(void) { printf(" transfer has succeeded)\n"); printf(" --delete-before Delete extras before the transfer starts\n"); printf(" (implies --delete)\n"); - printf(" --delete-during Delete extras once the keep-set manifest is known,\n"); - printf(" before the data is applied (implies --delete)\n"); + printf(" --delete-during Delete a directory's extras as that directory is\n"); + printf(" processed (implies --delete)\n"); printf(" --del Alias for --delete-during\n"); - printf(" --delete-delay Delete extras only after a successful transfer\n"); - printf(" (implies --delete)\n"); + printf(" --delete-delay Record the extras during the scan but remove them\n"); + printf(" only after a successful transfer (implies --delete)\n"); printf(" --delete-after Delete only after the whole transfer succeeded\n"); printf(" (the default --delete timing; implies --delete)\n"); printf(" --delete-excluded Also delete destination files that were excluded on\n"); diff --git a/src/shared/config.h b/src/shared/config.h index caea86d..4ee5ae5 100644 --- a/src/shared/config.h +++ b/src/shared/config.h @@ -547,13 +547,17 @@ typedef struct Config { /* rsync deletion-timing family (real from Phase 3). At most one of delete_before / delete_during / delete_delay / delete_after may be set, and only together with use_delete (the CLI implies --delete for each of them). - delete_before and delete_during select the EARLY engine mode: the keep-set + delete_before selects the EARLY engine mode: the whole-tree keep-set manifest is transmitted before any file data and extras are removed then, - acknowledged, before the first data byte. delete_delay and delete_after - select the LATE commit mode: extras are removed only after the whole - transfer has succeeded (plain --delete keeps this mode). The exact - semantics and the divergences from rsync are documented in RSYNC_COMPAT.md - and in config_delete_timing_early() below. */ + acknowledged, before the first data byte. delete_during and delete_delay + select the per-directory delete-plan mode (protocol 2.24.0): one plan per + source directory is streamed in directory order, and the receiver removes + each directory's extras when its plan arrives (during) or snapshots them + and removes them only after a successful transfer (delay). delete_after + (and plain --delete) keep the whole-tree commit mode: extras are removed + from a fresh end-of-transfer destination scan only after the whole transfer + succeeded. See config_delete_timing_early()/config_delete_timing_per_dir() + below. */ /* partial_dir */ // PR #174: Partial transfer resumption /* suffix */