Repository navigation
Conversation
Before status or diff runs, a check reads the repository's config files to decide if git must be asked about filter drivers. It matched "filter" or "include" anywhere in those files. A partial clone's partialclonefilter, a branch named filter-work, and a remote URL that contains "include" all matched, which added one git process each time status or diff ran. A filter driver or an include can only come from a section, and git reads the section name straight after the opening bracket: `[ filter "x"]` is a fatal config error. So look for `[filter` and `[include`, in any case. This also matches `[filter.x]` and a second section on one line, such as `[core] [filter "x"]`.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Author
|
Sorry, I am no longer working with ccstatusline for now and have no bandwidth to shepherd the changes here |
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.
Relates to #397. Separate from #797, which removes other git processes. The two can merge in either order. Together they merge cleanly, and a render after the TTL in a partial clone goes from 5 git processes to 1.
What
Before
statusordiffruns, ccstatusline reads the repository's config files to decide if it must ask git about filter drivers. That check matched the wordsfilterorincludeanywhere in those files. It now looks for a section that starts with[filteror[include, in any case. This removes one git process each timestatusordiffruns in a repository that only has those words somewhere else.Git Branch and Git Changes in a partial clone, with no other change applied:
mainA repository with neither word in its config runs 4 on both.
Why
git clone --filter=blob:nonewritespartialclonefilterinto.git/config, so each partial clone pays for this process. So does a tracked branch namedfilter-work, or a remote URL that containsinclude. The answer is not kept between renders, so the process runs on each render wherestatusordiffmisses the cache.Each Claude Code session starts the status line again and again, so needless processes add up across sessions. They cost more on machines where process starts are slow, for example when endpoint security software checks each one.
Why the protection stays
This check is part of the hardening from GHSA-rf4f-gc2h-c9vp, so a missed filter would be a security problem. An extra match only costs one process. A filter driver or an include can only come from a section, and git reads the section name straight after the opening bracket. This is how git 2.54 read each form:
[filter "x"]filter.x.clean[FILTER "x"]filter.x.clean[filter.x]filter.x.clean[core][filter "x"]filter.x.clean[core] [filter "x"] clean = cmdfilter.x.clean[include],[includeIf "gitdir:/"][ filter "x"]fatal: bad config line 1filter.x.clean = cmdwith no sectionfatal: bad config line 1partialclonefilter = blob:none[branch "filter-x"]Repositories with a real filter or include section, such as a local Git LFS install, still run this process each time. That is the same as before.
Testing
I counted processes for one render with a fixed JSON payload, a fresh cache directory,
COLUMNSset, and these widgets: Context Length, Git Branch, Git Changes, Model, Output Speed, and Thinking Effort. The runs used the builtdistunder Node 26 on macOS, and a preload aroundchild_processlogged each call. The fixture is a real partial clone. The rendered output matchedmainin each scenario.What I checked:
bun run lint,bun run build, andbun teston macOS with Bun 1.4.3. Process starts are slow on this laptop, so I used--timeout 60000. The remaining failures were in the custom command capture tests, which also fail intermittently onmainon this laptop, with a different set each run. One earlier run also failed the Git LFS and the filter name hardening tests. Later repeated runs on this branch and onmaindid not reproduce that. Both of those tests have[filterin their config, so this check gives the same answer as before for them.include.What I did not check: