-c, --checksum — skip files based on checksum instead of size + mtime
Current FastSync behavior:
Incremental mode (--incremental) compares file size and mtime in src/shared/file.c:333-334. The delta transfer (--delta) only applies after a file is deemed changed. There is no whole-file checksum comparison.
Proposed changes:
CLI flag: -c, --checksum
Config field: bool use_checksum
Implementation:
Compute xxHash (already a dependency) of each source file during scan
Send checksum alongside size/mtime in STATUS_CHECK
Server compares checksum of existing destination file and replies STATUS_OK if it matches
Falls back to delta transfer if checksum differs and --delta is enabled
Protocol: extend STATUS_CHECK payload to include a checksum field, or add a new STATUS_CHECKSUM status
Priority: medium Rationale: Size+mtime can miss content changes that preserve mtime or when clocks are unreliable. Checksum-based comparison is the safest skip heuristic and a common rsync workflow.
Changed content with identical size and mtime is still transferred
Works together with --incremental and --delta
Integration test verifies checksum skip behavior
**Corresponding rsync flags/behavior:**
- `-c, --checksum` — skip files based on checksum instead of size + mtime
**Current FastSync behavior:**
Incremental mode (`--incremental`) compares file size and mtime in `src/shared/file.c:333-334`. The delta transfer (`--delta`) only applies after a file is deemed changed. There is no whole-file checksum comparison.
**Proposed changes:**
- CLI flag: `-c, --checksum`
- Config field: `bool use_checksum`
- Implementation:
- Compute xxHash (already a dependency) of each source file during scan
- Send checksum alongside size/mtime in `STATUS_CHECK`
- Server compares checksum of existing destination file and replies `STATUS_OK` if it matches
- Falls back to delta transfer if checksum differs and `--delta` is enabled
- Protocol: extend `STATUS_CHECK` payload to include a checksum field, or add a new `STATUS_CHECKSUM` status
**Priority:** medium
**Rationale:** Size+mtime can miss content changes that preserve mtime or when clocks are unreliable. Checksum-based comparison is the safest skip heuristic and a common rsync workflow.
**Acceptance criteria:**
- [ ] `client -c /src /dst` skips files whose xxHash matches the destination
- [ ] Changed content with identical size and mtime is still transferred
- [ ] Works together with `--incremental` and `--delta`
- [ ] Integration test verifies checksum skip behavior
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Corresponding rsync flags/behavior:
-c, --checksum— skip files based on checksum instead of size + mtimeCurrent FastSync behavior:
Incremental mode (
--incremental) compares file size and mtime insrc/shared/file.c:333-334. The delta transfer (--delta) only applies after a file is deemed changed. There is no whole-file checksum comparison.Proposed changes:
-c, --checksumbool use_checksumSTATUS_CHECKSTATUS_OKif it matches--deltais enabledSTATUS_CHECKpayload to include a checksum field, or add a newSTATUS_CHECKSUMstatusPriority: medium
Rationale: Size+mtime can miss content changes that preserve mtime or when clocks are unreliable. Checksum-based comparison is the safest skip heuristic and a common rsync workflow.
Acceptance criteria:
client -c /src /dstskips files whose xxHash matches the destination--incrementaland--delta