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/3692

ubassets.com/assets/actions-9111c292f95f2fb0.css" /> Handle SHA-256 zero OIDs in pre-push by Sean-Kenneth-Doherty · Pull Request #3692 · pre-commit/pre-commit · GitHub
Skip to content

Handle SHA-256 zero OIDs in pre-push#3692

Closed
Sean-Kenneth-Doherty wants to merge 1 commit into
pre-commit:mainfrom
Sean-Kenneth-Doherty:fix/pre-push-sha256-zero-oid
Closed

Handle SHA-256 zero OIDs in pre-push#3692
Sean-Kenneth-Doherty wants to merge 1 commit into
pre-commit:mainfrom
Sean-Kenneth-Doherty:fix/pre-push-sha256-zero-oid

Conversation

@Sean-Kenneth-Doherty
Copy link
Copy Markdown

Summary

  • recognize both SHA-1 and SHA-256 all-zero object IDs in pre-push hook stdin
  • skip delete-only pushes before attempting diff/rev traversal
  • add a regression test for SHA-256 deletion pushes

Fixes #3664.

Testing

  • .venv/bin/python -m pytest -q tests/commands/hook_impl_test.py -k "pre_push_deleting_branch"
  • .venv/bin/python -m pytest -q tests/commands/hook_impl_test.py
  • .venv/bin/pre-commit run --files pre_commit/commands/hook_impl.py tests/commands/hook_impl_test.py

@asottile
Copy link
Copy Markdown
Member

sorry we don't accept ai slop contributions

@asottile asottile closed this May 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Z40 = '0' * 40 hardcoding breaks git push --delete on SHA-256 repos

2 participants

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