Skip to content

fix(hooks): skip the pre-push suite on delete-only pushes - #231

Merged
amirotin merged 1 commit into
mainfrom
fix/prepush-delete-only
Aug 7, 2026
Merged

fix(hooks): skip the pre-push suite on delete-only pushes#231
amirotin merged 1 commit into
mainfrom
fix/prepush-delete-only

Conversation

@amirotin

@amirotin amirotin commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Найдено при чистке веток: удаление remote-ветки — это тоже push, и хук гонял полный ~3-минутный гейт на каждое из 21 удалений, пока батч не упёрся в таймаут. Удаление не несёт кода (git передаёт (delete) + нулевой sha) — теперь такие строки скипаются как tag-only случай. Смешанный пуш (код + удаления) по-прежнему гоняет сьют; пустой stdin (dry-run) по-прежнему проваливается в проверки. Проверено синтетическим stdin на всех трёх сценариях.

Deleting a remote branch is a push, and the hook ran the full ~3-minute
gate for every deletion — cleaning 21 stale remote branches after the
P-series triggered it per branch until the batch timed out. A deletion
moves no code: git hands the hook local_ref="(delete)" with an all-zero
local sha, so treat those lines like the tag-only case and short-circuit.

Mixed pushes (a real ref + deletions) still run the suite, and an empty
stdin (dry-run) still falls through, as before. Verified by feeding the
hook synthetic stdin for all three scenarios.
Copilot AI lite review requested due to automatic review settings August 7, 2026 22:29

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@sonarqubecloud

sonarqubecloud Bot commented Aug 7, 2026

Copy link
Copy Markdown

@amirotin
amirotin merged commit 918c0af into main Aug 7, 2026
25 checks passed
@amirotin
amirotin deleted the fix/prepush-delete-only branch August 7, 2026 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants