From cbe4efa03cee93ca144a73a211f74968ad929b62 Mon Sep 17 00:00:00 2001 From: Claude Code Date: Tue, 21 Apr 2026 06:45:42 +0000 Subject: [PATCH] fix: scope git add to vault directories in auto-commit.sh git add -A staged every file in the project root, including dotfiles and credentials that may have been accidentally placed outside the vault's knowledge directories. Scoping to the known vault paths (notes/, ops/, self/, inbox/, templates/, .arscontexta) prevents inadvertent staging of sensitive content while still capturing all intentional vault writes. Co-Authored-By: Claude Code --- hooks/scripts/auto-commit.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hooks/scripts/auto-commit.sh b/hooks/scripts/auto-commit.sh index 37cf654..4f419cc 100755 --- a/hooks/scripts/auto-commit.sh +++ b/hooks/scripts/auto-commit.sh @@ -25,8 +25,9 @@ if ! git rev-parse --is-inside-work-tree &>/dev/null; then exit 0 fi -# Stage all changes -git add -A 2>/dev/null || exit 0 +# Stage vault directories only — avoid accidentally committing credentials +# or sensitive files placed outside the vault's knowledge space +git add notes/ ops/ self/ inbox/ templates/ .arscontexta 2>/dev/null || true # Check if there are staged changes if git diff --cached --quiet 2>/dev/null; then