1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-10-24 01:02:16 +02:00

Mute stderr in git_obs.Git.lfs_cat_file()

This commit is contained in:
2025-10-08 13:22:25 +02:00
parent 6672d1a88c
commit 5e0ab3ecb0

View File

@@ -308,7 +308,7 @@ class Git:
"""
A generator function that returns chunks of bytes of the requested file.
"""
with subprocess.Popen(["git", "cat-file", "--filters", f"{ref}:{filename}"], stdout=subprocess.PIPE, cwd=self.abspath) as proc:
with subprocess.Popen(["git", "cat-file", "--filters", f"{ref}:{filename}"], stdout=subprocess.PIPE, stderr=subprocess.DEVNULL, cwd=self.abspath) as proc:
assert proc.stdout is not None
while True:
# 1MiB chunks are probably a good balance between memory consumption and performance