Skip to content

fix(git): honor status_max_files and status_max_untracked (#3296) - #3311

Open
NanoRisk6 wants to merge 1 commit into
rtk-ai:developfrom
NanoRisk6:cat/status-max-files-3296
Open

fix(git): honor status_max_files and status_max_untracked (#3296)#3311
NanoRisk6 wants to merge 1 commit into
rtk-ai:developfrom
NanoRisk6:cat/status-max-files-3296

Conversation

@NanoRisk6

Copy link
Copy Markdown

What Problem This Solves

[limits].status_max_files and status_max_untracked in RTK config were never applied. rtk git status printed the full porcelain list on large WIP monorepos, so the highest-volume git command skipped the configured compaction. Fixes #3296.

Why This Change Was Made

format_status_inner now caps tracked changes and untracked entries separately using config::limits(), and appends an overflow line (... +N more changed/untracked) when truncated. Tests can pass unlimited caps for the full-path recovery case.

User Impact

Large repos respect status_max_files / status_max_untracked (defaults 15 / 10). Agents and humans get compact status with an explicit remainder count instead of a wall of paths.

Evidence

cargo test --bin rtk test_format_status
# 9 passed including test_format_status_honors_status_max_files_and_untracked

limits.status_max_* lived in config but format_status ignored them, so
large repos printed the full porcelain list. Cap tracked and untracked
entries separately and surface overflow counts so monorepo status stays
compact under configured limits.
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

rtk git status ignores status_max_files config limit on repos with many changed files

2 participants