fix(hooks): cover cherry-pick and git am, and correct the claim that they could not be - #3330
Merged
Conversation
added 2 commits
September 6, 2026 02:08
gHashTag
enabled auto-merge (squash)
September 5, 2026 19:09
Contributor
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #3329
Correcting my own published claim. Section 594 and its note said
cherry-pickruns neither commit hook and git offers none that could stop it. That was measured with markers on six hook names. Re-measured over the full thirteen:merge --no-ffcherry-pickgit amrebaseA non-zero exit from
prepare-commit-msgaborts a cherry-pick (exit 128, no commit created) and fromapplypatch-msgaborts agit am(exit 1, no commit created). Both verified directly."Nothing fired" can mean "I did not look". The population of a probe is as narrow as its instrument list — that is the lesson, and it is now section 594's closing line.
Three hooks added.
prepare-commit-msggates only when.git/CHERRY_PICK_HEADexists, so an ordinary commit still pays exactly one barrier run — verified at 1, not 2.Both controls were void on their first run and had to be redone, which is why they are quoted: the ordinary-commit control was refused by the census for an unrelated reason, and the
git amcontrol was refused by git itself for a dirty index. Neither refusal came from the hook under test.rebasefires nothing at all and remains genuinely uncovered.Also blessing two census moves that are NOT mine:
quiet128 → 127 andshell235 → 234, from a neighbour repairing two workflows (95d93c6, 3429f9c). Confirmed on a cleanorigin/mastercheckout with the same binary before blessing;cli-trihas been red on master since those merges.