quick-wins: ControlMaster, -z alias, --progress, fix write warning

- SSH ControlMaster auto with ControlPath for connection reuse
- -z as alias for -c (compression)
- --progress flag showing transfer rate in send_files
- Fixed unused-result warning on write() in transport_ssh.c
This commit is contained in:
2026-07-16 12:28:16 +02:00
parent 78cc735cff
commit d1a23fc4df
5 changed files with 35 additions and 4 deletions
+5 -3
View File
@@ -91,10 +91,12 @@ Client *client_connect_ssh(char *destination) {
snprintf(ssh_user, sizeof(ssh_user), "%s", r.host);
execlp("ssh", "ssh", "-o", "Compression=no", "-o",
"ControlMaster=no", ssh_user, "fastsync-server", "--stdio",
(char *)NULL);
"ControlMaster=auto", "-o",
"ControlPath=~/.cache/fastsync-%r@%h:%p", ssh_user,
"fastsync-server", "--stdio", (char *)NULL);
perror("exec of ssh failed");
(void)write(exec_pipe[1], "x", 1);
ssize_t wret = write(exec_pipe[1], "x", 1);
(void)wret;
_exit(1);
}