Skip to content

Commit

Permalink
git: pass --no-write-fetch-head to git
Browse files Browse the repository at this point in the history
This makes the fetch invisible to other people.
  • Loading branch information
bsdinis committed Feb 15, 2025
1 parent 4a47a4f commit ed02051
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/src/git_subprocess.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
Expand Down

0 comments on commit ed02051

Please sign in to comment.