fix/hooks-detect-default-branch #2

Merged
neerdoc merged 2 commits from fix/hooks-detect-default-branch into main 2026-08-07 14:55:55 +00:00
Owner
No description provided.
Hardcoded "main" silently did nothing on repos whose trunk has a
different name (e.g. alpinebox kept "master" from its upstream fork),
and didn't cover release lines at all. Check against a pattern list
(main, master, release/**, plus the remote's actual default branch)
instead, overridable per-repo via git config hooks.protectedbranches.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The new-branch base-ref calculation hardcoded refs/remotes/origin/main.
On a repo whose trunk isn't literally "main" (e.g. alpinebox's "master"),
that rev-parse silently fails and the code falls through to scanning the
pushed branch's *entire* history for signatures instead of just the new
commits — rejecting the push over pre-existing unsigned history that has
nothing to do with what's actually being sent.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
WulfScience-FOSS/wulf-dev!2
No description provided.