feat: add -x/--one-file-system to stay within the source filesystem
Capture the transfer root's device (st_dev) at scanner creation and skip descending into any subdirectory on a different device (a mount point). Implemented sender/client-side only: sequential BFS and parallel (-m) root scan apply the same scanner_same_filesystem decision; no wire/protocol change and default behavior is unchanged. Unit tests cover the pure decision, same device scanning in both modes, and CLI parsing; integration tests prove -x leaves a single-filesystem tree byte-identical and, when root can mount a tmpfs, skips a genuine cross-device subtree.
This commit is contained in:
@@ -104,6 +104,7 @@ typedef struct Config {
|
||||
char* files_from;
|
||||
bool cvs_exclude;
|
||||
bool prune_empty_dirs;
|
||||
bool one_file_system; /* -x/--one-file-system: do not cross filesystem boundaries */
|
||||
bool relative;
|
||||
|
||||
// Issue #130: Remote shell/connection options
|
||||
|
||||
Reference in New Issue
Block a user