Repository navigation
Keep ccstatusline's git cache until HEAD or the index changes, plus ADR 0061 - #67
Merged
Merged
Conversation
With the default gitCacheTtlSeconds of 5, every refresh in every session re-runs four git processes (two of them full worktree stats, since ccstatusline forces fsmonitor off) every 5 seconds, even when nothing changed. A TTL of 0 means the cached result stays valid until .git/HEAD or .git/index changes. Tradeoff: an unstaged edit doesn't show in the +/- counts until something rewrites the index (a plain git status/diff/add does). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Covers the pin, the mise install + shim (#66), and the HEAD/index-keyed git cache, with the per-refresh breakdown and the Rust statusline benchmarks that were considered. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
gitCacheTtlSecondsto0, which keeps its cached git results valid until.git/HEADor.git/indexchanges. The default of 5 reruns four git processes every 5 seconds per session even when nothing changed, and two of them stat the whole worktree (ccstatusline forces fsmonitor off).Tradeoff
An unstaged edit doesn't show up in the
+/-counts until something rewrites the index. A plaingit status,diff, oradddoes; tools running with--no-optional-locksdon't. I barely look at those counts, so a little stale beats paying for it on every refresh.Rollout
config/ccstatusline/settings.jsonis a hand-copied twin of~/.config/ccstatusline/settings.json, not a symlink, so copy it over (already done on this machine).🤖 Generated with Claude Code