mirror of
https://github.com/qwibitai/nanoclaw.git
synced 2026-06-04 10:14:47 +08:00
bd50ef7e38
Capture staged file list before prettier runs, then re-add only those files. Prevents pulling in unrelated unstaged changes. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
6 lines
157 B
Plaintext
6 lines
157 B
Plaintext
staged=$(git diff --cached --name-only --diff-filter=ACM -- 'src/**/*.ts')
|
|
pnpm run format:fix
|
|
if [ -n "$staged" ]; then
|
|
echo "$staged" | xargs git add
|
|
fi
|