feat(gitflow): chore branch type + aiguillage for standalone memory/doc skills
Standalone /capitalize /close /prune-memory /reconcile no longer lean on the .claude/** hook exemption when run on main/develop: the aiguillage branches them to chore/* off develop before writing. New chore type (base develop, finish->develop) added to the lib; hook unchanged (chore/* non-protected). Closes the leak where standalone memory work (memory IS the work, no code branch to follow) landed direct on a protected base. 64/64 gitflow-test green, shellcheck clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RNaYKPEkjH1jbgoX1TwKMX
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
53bd7beee8
commit
e8807a7333
+4
-3
@@ -21,7 +21,7 @@ GITFLOW_GITIGNORE_TEMPLATE="${GITFLOW_GITIGNORE_TEMPLATE:-$_GITFLOW_LIB_DIR/../t
|
||||
|
||||
# ── predicates / pure helpers ────────────────────────────────────────────────
|
||||
|
||||
# echo the gitflow type of a branch: feature|bugfix|release|hotfix|main|develop|other
|
||||
# echo the gitflow type of a branch: feature|bugfix|release|hotfix|chore|main|develop|other
|
||||
gitflow_branch_type() {
|
||||
local br="${1:-$(git symbolic-ref --short -q HEAD 2>/dev/null)}"
|
||||
case "$br" in
|
||||
@@ -31,6 +31,7 @@ gitflow_branch_type() {
|
||||
bugfix/*) echo bugfix ;;
|
||||
release/*) echo release ;;
|
||||
hotfix/*) echo hotfix ;;
|
||||
chore/*) echo chore ;;
|
||||
*) echo other ;;
|
||||
esac
|
||||
}
|
||||
@@ -46,7 +47,7 @@ gitflow_protected_base() {
|
||||
# echo the base a given type must fork from.
|
||||
gitflow_base_for() {
|
||||
case "$1" in
|
||||
feature|bugfix|release) echo "$GITFLOW_DEVELOP" ;;
|
||||
feature|bugfix|release|chore) echo "$GITFLOW_DEVELOP" ;;
|
||||
hotfix) echo "$GITFLOW_MAIN" ;;
|
||||
*) echo "gitflow: unknown type '$1'" >&2; return 2 ;;
|
||||
esac
|
||||
@@ -103,7 +104,7 @@ gitflow_finish() {
|
||||
br="$(git symbolic-ref --short -q HEAD)" || { echo "gitflow_finish: detached HEAD" >&2; return 3; }
|
||||
type="$(gitflow_branch_type "$br")"
|
||||
case "$type" in
|
||||
feature|bugfix)
|
||||
feature|bugfix|chore)
|
||||
_gitflow_merge_into "$GITFLOW_DEVELOP" "$br" && _gitflow_delete "$br" ;;
|
||||
release)
|
||||
_gitflow_merge_into "$GITFLOW_MAIN" "$br" \
|
||||
|
||||
Reference in New Issue
Block a user