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.
This commit is contained in:
Cole Miller 2025-05-20 18:39:41 -04:00 committed by GitHub
parent d547a86e31
commit 1e51a7ac44
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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);