Skip to content
2 changes: 1 addition & 1 deletion pre_commit/commands/hook_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def _ns(


def _rev_exists(rev: str) -> bool:
return not subprocess.call(('git', 'rev-list', '--quiet', rev))
return subprocess.call(('git', 'cat-file', '-e', rev)) == 0
Comment thread
ptarjan marked this conversation as resolved.
Outdated


def _pre_push_ns(
Expand Down