Summary
The GitHub backend shells out to git (clone, pull, push, fetch) and all subprocess output is printed directly to the user's terminal, mixed in with opendotsync's own output. This is noisy and confusing.
Example
test1@fedora:~$ opendotsync pull
From github.com:piranhap/opendotsynctest
* branch main -> FETCH_HEAD
Already up to date.
Pulled version 4
Updated:
.bashrc
The first three lines are raw git output. Users don't need to see them during normal operation.
Similarly opendotsync status emits:
From https://github.com/piranhap/opendotsynctest
* branch main -> FETCH_HEAD
Already up to date.
Profile: default
...
Expected Behaviour
Git subprocess output should be suppressed by default. With --verbose it should be shown. Errors from git (non-zero exit) should still be captured and surfaced as opendotsync error messages.
Proposed Fix
In src/backend/github.rs, replace .status() with .output() for all git subprocess calls. Discard stdout/stderr on success. On failure, include captured stderr in the BackendError message.
// Before
Command::new("git").args([...]).status()?;
// After
let out = Command::new("git").args([...]).output()?;
if !out.status.success() {
let stderr = String::from_utf8_lossy(&out.stderr);
return Err(self.git_err(&format!("git ... failed: {}", stderr)));
}
The rclone backend has the same issue and should get the same treatment.
Affected Files
src/backend/github.rs — all Command::new("git") calls
src/backend/rclone.rs — all Command::new("rclone") calls
Summary
The GitHub backend shells out to
git(clone, pull, push, fetch) and all subprocess output is printed directly to the user's terminal, mixed in with opendotsync's own output. This is noisy and confusing.Example
The first three lines are raw git output. Users don't need to see them during normal operation.
Similarly
opendotsync statusemits:Expected Behaviour
Git subprocess output should be suppressed by default. With
--verboseit should be shown. Errors from git (non-zero exit) should still be captured and surfaced as opendotsync error messages.Proposed Fix
In
src/backend/github.rs, replace.status()with.output()for all git subprocess calls. Discard stdout/stderr on success. On failure, include captured stderr in theBackendErrormessage.The rclone backend has the same issue and should get the same treatment.
Affected Files
src/backend/github.rs— allCommand::new("git")callssrc/backend/rclone.rs— allCommand::new("rclone")calls