diff --git a/pre_commit/commands/hook_impl.py b/pre_commit/commands/hook_impl.py index ba6491b4..bd936133 100644 --- a/pre_commit/commands/hook_impl.py +++ b/pre_commit/commands/hook_impl.py @@ -115,7 +115,7 @@ def _rev_exists(rev: str) -> bool: def _is_ancestor(ancestor: str, rev: str): return not subprocess.call( - ('git', 'merge-base', '--is-ancestor', ancestor, rev) + ('git', 'merge-base', '--is-ancestor', ancestor, rev), ) @@ -133,7 +133,7 @@ def _pre_push_ns( if local_sha == Z40: continue elif remote_sha != Z40 and _rev_exists(remote_sha) \ - and _is_ancestor(remote_sha, local_sha): + and _is_ancestor(remote_sha, local_sha): return _ns( 'pre-push', color, from_ref=remote_sha, to_ref=local_sha,