Skip to content

fix(git): drop -uall from compact status so output never exceeds raw - #2035

Merged
aeppling merged 1 commit into
developfrom
fix/git-status-uall
May 22, 2026
Merged

aeppling merged 1 commit into
developfrom
fix/git-status-uall

Conversation

@aeppling

Copy link
Copy Markdown
Contributor

The compact git status path ran git status --porcelain -b -uall. The -uall flag expands fully-untracked directories into every file, while raw git status collapses them (e.g. node_modules/). This made rtk output larger than raw — measured ~29x on a 200-file untracked dir (5500B vs 191B) — violating RTK's compress-or-match-raw invariant and inflating tokens.

Remove -uall so untracked directories collapse exactly like raw. This keeps #991's actual fix intact: all modified/staged/renamed/conflict paths are still shown with no grouped summaries or ... +N more overflow markers (-uall never affected those lines). Untracked files in partially-tracked dirs and any paths git itself expands are still preserved by the formatter.

Measured (rtk vs raw git status):

The compact `git status` path ran `git status --porcelain -b -uall`. The
`-uall` flag expands fully-untracked directories into every file, while raw
`git status` collapses them (e.g. `node_modules/`). This made rtk output
larger than raw — measured ~29x on a 200-file untracked dir (5500B vs 191B) —
violating RTK's compress-or-match-raw invariant and inflating tokens.

Remove `-uall` so untracked directories collapse exactly like raw. This keeps
#991's actual fix intact: all modified/staged/renamed/conflict paths are still
shown with no grouped summaries or `... +N more` overflow markers (`-uall`
never affected those lines). Untracked files in partially-tracked dirs and any
paths git itself expands are still preserved by the formatter.

Measured (rtk vs raw git status):
- node_modules/ (200 files): 5500B (-2780%) -> 25B (+87% savings)
- normal (8 mod + 2 untracked): +71% -> +76%
- 17 modified (#991 case): unchanged at +58%, all 17 shown, 0 overflow markers

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@aeppling
aeppling merged commit 06476d1 into develop May 22, 2026
18 checks passed
thehoff added a commit to thehoff/contextcrawler that referenced this pull request Jun 12, 2026
…(rtk rtk-ai#2035)

The compact `git status` path ran `git status --porcelain -b -uall`, but we
measure savings against raw `git status` — which defaults to `-unormal` and
collapses fully-untracked directories to a single line. `-uall` expands them
into every file, so in any repo with a non-ignored untracked dir our output
exceeded raw (~29x on a 200-file dir), the opposite of the tool's purpose —
and the inflation was invisible because `savings_pct` floors at 0 (rtk-ai#196).

Drop `-uall` so untracked dirs collapse exactly like raw. Modified/staged/
renamed/conflict paths are unaffected by `-uall` and remain fully shown by
the formatter; state-header and detached-HEAD extraction read from the
separately-captured plain status, so they are unchanged.

Aligns with upstream rtk PR rtk-ai#2035. Council: Codex + mmax both APPROVE.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@aeppling
aeppling deleted the fix/git-status-uall branch June 30, 2026 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant