From 1e51a7ac44238d23d333a72ee619ee9dd52718aa Mon Sep 17 00:00:00 2001 From: Cole Miller Date: Tue, 20 May 2025 18:39:41 -0400 Subject: [PATCH] Don't pass `-z` flag to git-cat-file (#31053) Closes #30972 Release Notes: - Fixed a bug that prevented the `copy permalink to line` action from working on systems with older versions of git. --- crates/git/src/repository.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crates/git/src/repository.rs b/crates/git/src/repository.rs index 20b13e1f8a..2cf2368e75 100644 --- a/crates/git/src/repository.rs +++ b/crates/git/src/repository.rs @@ -752,7 +752,6 @@ impl GitRepository for RealGitRepository { "--no-optional-locks", "cat-file", "--batch-check=%(objectname)", - "-z", ]) .stdin(Stdio::piped()) .stdout(Stdio::piped()) @@ -765,7 +764,7 @@ impl GitRepository for RealGitRepository { .ok_or_else(|| anyhow!("no stdin for git cat-file subprocess"))?; let mut stdin = BufWriter::new(stdin); for rev in &revs { - write!(&mut stdin, "{rev}\0")?; + write!(&mut stdin, "{rev}\n")?; } drop(stdin);