merge: development -> main - #22
Conversation
Distill the cloned github/gitignore catalog (CC0-1.0, @57286c3) into a new skill/references/gitignore-templates.md covering composition guidance, pattern syntax/precedence, the negation trap, the four ignore layers, a CGW baseline block, curated stack and OS/editor templates, debugging with git check-ignore, and the already-tracked-file trap with the CGW-correct fix. Wire it into SKILL.md's index and hygiene section, and add it to verify_skill_commands.sh's DOCS array for drift protection.
| # project's own gate, e.g. its commit-msg hook) so the branch is not left | ||
| # with no message gate at all. | ||
| local _freeform=0 | ||
| if cgw_branch_is_freeform "${current_branch}"; then |
There was a problem hiding this comment.
Freeform branches bypass the repository's mandatory message check | 🔴 blocking | § repository-guidance
The base-branch rules still require conventional prefixes in .charlie/instructions/code-style.md:29 and say commit_enhanced.sh enforces that format in .charlie/instructions/git-workflow.md:20; CONTEXT.md likewise defines the format as enforced on every invocation. With CGW_FREEFORM_MESSAGE_CHECK unset (the default), this branch match lets any configured branch—including * or a protected branch—create non-conventional commits. Keep the mandatory check for this repository (or first update the authoritative base-branch policy) rather than making it optional here.
| _BRANCH="${REMOTE_REF#refs/heads/}" | ||
| [[ "${_BRANCH}" == "${REMOTE_REF}" ]] && _BRANCH="${LOCAL_REF#refs/heads/}" | ||
|
|
||
| if cgw_branch_is_freeform "${_BRANCH}"; then |
There was a problem hiding this comment.
Do not let an exempt branch hide commits from normal-branch validation | 🔴 blocking | § repository-guidance
After a non-conventional commit is pushed to an exempt branch such as up/x, it is reachable from origin/up/x. When that commit is later merged or fast-forwarded into development or main, COMMITS is built with git rev-list ... --not --remotes (lines 60–66), so the commit is omitted because it is already reachable from that remote-tracking ref; the non-freeform branch never calls cgw_validate_commit_message for it. This lets the branch-scoped exemption leak into ordinary branches and violates the base requirement that pushed commits use conventional messages. Track exemption provenance or otherwise revalidate such commits on non-freeform targets; apply the same fix in .githooks/pre-push.
| # matches a branch glob in CGW_FREEFORM_MESSAGE_BRANCHES, so tag pushes | ||
| # are unaffected. | ||
| _BRANCH="${REMOTE_REF#refs/heads/}" | ||
| [[ "${_BRANCH}" == "${REMOTE_REF}" ]] && _BRANCH="${LOCAL_REF#refs/heads/}" |
There was a problem hiding this comment.
Do not derive a tag push's exemption from the local branch | 🟠 non-blocking | § correctness
For a valid refspec such as git push origin up/x:refs/tags/v1, Git supplies LOCAL_REF=refs/heads/up/x and REMOTE_REF=refs/tags/v1. Because REMOTE_REF is not under refs/heads/, this fallback sets _BRANCH to up/x, which can match CGW_FREEFORM_MESSAGE_BRANCHES and skip conventional-message validation for the tag's commit range. That contradicts the comment immediately above claiming tag pushes are unaffected. Only use the remote ref when it is a refs/heads/* branch; do not fall back to a branch name for tag or other non-branch updates. Apply the same fix in .githooks/pre-push.
Changes
Branch
development->main