rtk-ai/rtk

rtk git commit hides post-commit hook output

Open

#1,355 建立於 2026年4月17日

在 GitHub 查看
 (1 留言) (0 反應) (0 負責人)Rust (48,085 star) (2,914 fork)batch import
bugeffort-smallfilter-qualitygood first issue

描述

When running git commit through rtk, output produced by a Git post-commit hook is not shown.

Minimal reproduction:

tmp=$(mktemp -d)
cd "$tmp"

git init -q
git config user.email test@example.com
git config user.name Tester

mkdir -p .git/hooks
cat > .git/hooks/post-commit <<'EOF'
#!/bin/sh
echo HOOK_STDOUT_visible
echo HOOK_STDERR_visible >&2
EOF
chmod +x .git/hooks/post-commit

printf "one\n" > f.txt
git add f.txt
git commit -m native

printf "two\n" >> f.txt
git add f.txt
rtk git commit -m rtk

Expected behavior:

rtk git commit should show the output produced by the post-commit hook, similar to native git commit.

Native git commit output includes:

HOOK_STDOUT_visible
HOOK_STDERR_visible
[main ...] native

Actual behavior:

rtk git commit only prints the compact success output:

ok

The hook output is not visible. This makes hook-generated messages easy to miss, including post-commit notices, validation summaries, local workflow hints, or follow-up instructions.

貢獻者指南

rtk git commit hides post-commit hook output · rtk-ai/rtk#1355 | Good First Issue