With hunk pager configured as LazyGit's pager, the branch-log panel loses all of Git's colors. Diffs are unaffected — only non-diff output is stripped.
Released hunkdiff@0.18.0 — colors stripped

With the fix — Git's colors preserved

Same repo, same commit, same terminal size. Only the pager binary differs. Note the [0] Log panel: commit SHAs and the (HEAD → main, origin/main, origin/HEAD) decoration go from flat gray to their normal per-ref palette.
Cause
Captured pager hosts like LazyGit advertise TERM=dumb while rendering ANSI in their own panel. Hunk already detects this for diffs — isCapturedPagerHost in src/app/startup.ts is what routes those hosts to the static colored renderer instead of launching the TUI. Non-diff input returns passthrough before reaching that point, and passthrough strips SGR unconditionally.
This is the LazyGit-shaped gap left by #381 (which closed #379). That fix preserves color via pagePlainText, but captured hosts never reach pagePlainText — TERM=dumb sends them down the passthrough path first.
The fix is to reuse the existing detection rather than add a second heuristic: the same predicate that already tells the diff path "this host renders ANSI" decides whether passthrough preserves it. Genuinely dumb terminals still get plain text.
Steps to reproduce
- Configure LazyGit with
git.paging.pager: hunk pager and colorArg: always
- Open LazyGit in any repo with history
- Select the
[3] Local branches panel
- The branch log in the main panel renders in a single color; with
GIT_PAGER=less it is colored
Environment
- hunkdiff 0.18.0 (npm)
- LazyGit 0.64.0, macOS arm64, git 2.53.0
With
hunk pagerconfigured as LazyGit's pager, the branch-log panel loses all of Git's colors. Diffs are unaffected — only non-diff output is stripped.Released
hunkdiff@0.18.0— colors strippedWith the fix — Git's colors preserved
Same repo, same commit, same terminal size. Only the pager binary differs. Note the
[0] Logpanel: commit SHAs and the(HEAD → main, origin/main, origin/HEAD)decoration go from flat gray to their normal per-ref palette.Cause
Captured pager hosts like LazyGit advertise
TERM=dumbwhile rendering ANSI in their own panel. Hunk already detects this for diffs —isCapturedPagerHostinsrc/app/startup.tsis what routes those hosts to the static colored renderer instead of launching the TUI. Non-diff input returnspassthroughbefore reaching that point, and passthrough strips SGR unconditionally.This is the LazyGit-shaped gap left by #381 (which closed #379). That fix preserves color via
pagePlainText, but captured hosts never reachpagePlainText—TERM=dumbsends them down the passthrough path first.The fix is to reuse the existing detection rather than add a second heuristic: the same predicate that already tells the diff path "this host renders ANSI" decides whether passthrough preserves it. Genuinely dumb terminals still get plain text.
Steps to reproduce
git.paging.pager: hunk pagerandcolorArg: always[3] Local branchespanelGIT_PAGER=lessit is coloredEnvironment