rtk-ai/rtk

rtk git commit hides post-commit hook output

Open

#1 355 ouverte le 17 avr. 2026

Voir sur GitHub
 (1 commentaire) (0 réactions) (0 assignés)Rust (2 914 forks)batch import
area:clibugeffort-smallfilter-qualitygood first issueneeds-reproductionpriority:medium

Métriques du dépôt

Stars
 (48 085 stars)
Métriques de merge PR
 (Merge moyen 11j 1h) (45 PRs mergées en 30 j)

Description

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.

Guide contributeur