rtk-ai/rtk

rtk git commit hides post-commit hook output

Open

#1355 aperta il 17 apr 2026

Vedi su GitHub
 (1 commento) (0 reazioni) (0 assegnatari)Rust (2914 fork)batch import
area:clibugeffort-smallfilter-qualitygood first issueneeds-reproductionpriority:medium

Metriche repository

Star
 (48.085 star)
Metriche merge PR
 (Merge medio 11g 1h) (45 PR mergiate in 30 g)

Descrizione

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.

Guida contributor