Уточнить: Agent коммитит через scripts/git-commit.sh

This commit is contained in:
2026-07-07 16:55:12 +03:00
parent 6e52c53906
commit 033302373e
2 changed files with 26 additions and 9 deletions
+18
View File
@@ -0,0 +1,18 @@
#!/usr/bin/env bash
# Обход: Agent Shell ломает "git commit" в PowerShell (trailer с <).
# Вызов: bash scripts/git-commit.sh "message" [paths...]
set -euo pipefail
if [ $# -lt 2 ]; then
echo "Usage: git-commit.sh \"message\" <paths...>" >&2
exit 1
fi
MSG=$1
shift
REPO_ROOT=$(cd "$(dirname "$0")/.." && pwd)
cd "$REPO_ROOT"
git add "$@"
/usr/bin/git commit -m "$MSG"
git log -1 --oneline