rtk-ai/rtk

git log --format placeholders mangled by rtk proxy

Open

#1.058 geöffnet am 6. Apr. 2026

Auf GitHub ansehen
 (1 Kommentar) (0 Reaktionen) (0 zugewiesene Personen)Rust (2.914 Forks)batch import
area:clibugeffort-smallfilter-qualitygood first issueplatform:macospriority:medium

Repository-Metriken

Stars
 (48.085 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 11T 1h) (45 gemergte PRs in 30 T)

Beschreibung

Bug Description

When running git log with --format or --pretty=format containing date placeholders like %Y%m%d, rtk's proxy mangles the output. The format string is not passed through correctly to git.

Steps to Reproduce

# Direct git (expected: 20260119)
/opt/homebrew/bin/git -C /some/repo log -1 --pretty=format:'%cd' --date=format:'%Y%m%d'
# Output: 20260119 ✅

# Via rtk (mangled)
git log -1 --format='%Y%m%d'
# Output: %Y> (HEAD, branch-name, ...) ❌

Expected Behavior

Format placeholders should be passed through to git unchanged. --format='%Y%m%d' and --pretty=format:'%cd' --date=format:'%Y%m%d' should produce the same output as calling git directly.

Workaround

Using --pretty=format:'%cd' --date=format:'%Y%m%d' works correctly through rtk. Only --format with certain placeholders is affected.

Environment

  • rtk version: 0.34.3
  • OS: macOS (Darwin 25.4.0, arm64)
  • Shell: zsh

Contributor Guide