From cf3e1d948c4cf615adb8e85d146eb92264a57716 Mon Sep 17 00:00:00 2001 From: Aleksey Sabilin Date: Tue, 7 Jul 2026 16:54:03 +0300 Subject: [PATCH] Add WSL git-commit helper for Agent --- scripts/git-commit.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 scripts/git-commit.sh diff --git a/scripts/git-commit.sh b/scripts/git-commit.sh new file mode 100644 index 0000000..b048489 --- /dev/null +++ b/scripts/git-commit.sh @@ -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\" " >&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