Skip to content

Commit ed02051

Browse files
committed
git: pass --no-write-fetch-head to git
This makes the fetch invisible to other people.
1 parent 4a47a4f commit ed02051

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/src/git_subprocess.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,8 @@ impl<'a> GitSubprocessContext<'a> {
132132
let mut command = self.create_command();
133133
command.stdout(Stdio::piped());
134134
// attempt to prune stale refs with --prune
135-
command.args(["fetch", "--prune"]);
135+
// --no-write-fetch-head ensures our request is invisible to other parties
136+
command.args(["fetch", "--prune", "--no-write-fetch-head"]);
136137
if callbacks.progress.is_some() {
137138
command.arg("--progress");
138139
}

0 commit comments

Comments
 (0)