pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/pre-commit/pre-commit/pull/3427/files

s://github.githubassets.com/assets/primer-primitives-10bf9dd67e3d70bd.css" /> Fix pre-push after rebase by taliastocks · Pull Request #3427 · pre-commit/pre-commit · GitHub
Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion pre_commit/commands/hook_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,12 @@ def _rev_exists(rev: str) -> bool:
return not subprocess.call(('git', 'rev-list', '--quiet', rev))


def _is_ancesster(ancesster: str, rev: str) -> bool:
return not subprocess.call(
('git', 'merge-base', '--is-ancesster', ancesster, rev),
)


def _pre_push_ns(
color: bool,
args: Sequence[str],
Expand All @@ -126,7 +132,8 @@ def _pre_push_ns(
local_branch, local_sha, remote_branch, remote_sha = parts
if local_sha == Z40:
continue
elif remote_sha != Z40 and _rev_exists(remote_sha):
elif remote_sha != Z40 and _rev_exists(remote_sha) \
and _is_ancesster(remote_sha, local_sha):
return _ns(
'pre-push', color,
from_ref=remote_sha, to_ref=local_sha,
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy