Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
hooks/pre-commit text eol=lf

# Text files — normalize to LF
.shellcheckrc text eol=lf
*.md text eol=lf
*.conf text eol=lf
*.example text eol=lf
Expand Down
4 changes: 2 additions & 2 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ set -uo pipefail

echo "Checking for local-only files..."

PROBLEMATIC_FILES=$(git diff --cached --name-status | grep -E "^[AM][[:space:]]+(CLAUDE\.md|SESSION_LOG\.md|\.claude|logs)" || true)
PROBLEMATIC_FILES=$(git diff --cached --name-status | grep -E "^[AM][[:space:]]+(CLAUDE\.md|MEMORY\.md|\.claude|logs)" || true)

if [[ -n "${PROBLEMATIC_FILES}" ]]; then
echo "ERROR: Attempting to add or modify local-only files!"
Expand All @@ -28,7 +28,7 @@ if [[ -n "${PROBLEMATIC_FILES}" ]]; then
exit 1
fi

DELETED_FILES=$(git diff --cached --name-status | grep -E "^D[[:space:]]+(CLAUDE\.md|SESSION_LOG\.md|\.claude|logs)" || true)
DELETED_FILES=$(git diff --cached --name-status | grep -E "^D[[:space:]]+(CLAUDE\.md|MEMORY\.md|\.claude|logs)" || true)
if [[ -n "${DELETED_FILES}" ]]; then
echo " Local-only files being removed from git tracking (allowed)"
fi
Expand Down
8 changes: 4 additions & 4 deletions .githooks/pre-push
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@
# The patterns below are populated by configure.sh from CGW_LOCAL_FILES
# and CGW_ALL_PREFIXES. To regenerate, run: ./scripts/git/configure.sh --skip-skill
#
# CONVENTIONAL PREFIXES: feat\|fix\|docs\|chore\|test\|refactor\|style\|perf
# LOCAL FILES PATTERN: CLAUDE\.md|SESSION_LOG\.md|\.claude|logs
# CONVENTIONAL PREFIXES: feat|fix|docs|chore|test|refactor|style|perf
# LOCAL FILES PATTERN: CLAUDE\.md|MEMORY\.md|\.claude|logs

set -uo pipefail

# ---------------------------------------------------------------------------
# Read stdin: remote <name>, url <url>, <local-ref> <local-sha> <remote-ref> <remote-sha>
# ---------------------------------------------------------------------------

LOCAL_FILES_PATTERN="CLAUDE\.md|SESSION_LOG\.md|\.claude|logs"
ALL_PREFIXES="feat\|fix\|docs\|chore\|test\|refactor\|style\|perf"
LOCAL_FILES_PATTERN="CLAUDE\.md|MEMORY\.md|\.claude|logs"
ALL_PREFIXES="feat|fix|docs|chore|test|refactor|style|perf"

# Collect push info from stdin (git passes it to pre-push)
while read -r LOCAL_REF LOCAL_SHA REMOTE_REF REMOTE_SHA; do
Expand Down
Loading
Loading