git: pass --no-write-fetch-head to git

This makes the fetch invisible to other people.
This commit is contained in:
Baltasar Dinis 2025-02-15 16:26:24 +00:00 committed by Baltasar Dinis
parent 00bc69b10e
commit 31afda99d4

View File

@ -132,7 +132,8 @@ impl<'a> GitSubprocessContext<'a> {
let mut command = self.create_command();
command.stdout(Stdio::piped());
// attempt to prune stale refs with --prune
command.args(["fetch", "--prune"]);
// --no-write-fetch-head ensures our request is invisible to other parties
command.args(["fetch", "--prune", "--no-write-fetch-head"]);
if callbacks.progress.is_some() {
command.arg("--progress");
}