From ed0d44b665eb0af6931b7b26fff97f11e70969c2 Mon Sep 17 00:00:00 2001 From: Paul Tarjan Date: Fri, 26 Dec 2025 15:15:34 -0700 Subject: [PATCH] redirect stderr to devnull --- pre_commit/commands/hook_impl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pre_commit/commands/hook_impl.py b/pre_commit/commands/hook_impl.py index ddfac519..d33fbce2 100644 --- a/pre_commit/commands/hook_impl.py +++ b/pre_commit/commands/hook_impl.py @@ -111,7 +111,7 @@ def _ns( def _rev_exists(rev: str) -> bool: - return subprocess.call(('git', 'cat-file', '-e', rev)) == 0 + return subprocess.call(('git', 'cat-file', '-e', rev), stderr=subprocess.DEVNULL) == 0 def _pre_push_ns(