You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[config] status_max_files and status_max_untracked are declared in LimitsConfig but never read #2437
Two fields in LimitsConfig (src/core/config.rs:123-145) are declared with serde defaults and are user-configurable in config.toml, but no code reads them. The git status command never bounds its output by them.
Repro
Set values in ~/AppData/Roaming/rtk/config.toml (Windows) or ~/.config/rtk/config.toml (Unix):
In a repo with > 2 modified files and > 1 untracked file, run rtk git status.
Observe: the user's caps are ignored; status shows all files.
Evidence
src/cmds/git/git.rs contains the status formatting pipeline (format_status_output, format_status_inner, run_status) but zero references to config::limits() or to either field name. Verified by:
The only references outside config.rs are in src/core/README.md documenting the config schema.
Suspected cause
The status command in git.rs:673 (format_status_output) was likely refactored to use a fixed-path porcelain parser that iterates the entire porcelain.lines() vec. The previous version probably bounded displayed rows; the refactor dropped the cap and the LimitsConfig fields were left orphaned.
Two options
Option A (preferred — wire them up): Re-add the cap in format_status_inner. The cap is non-trivial because the porcelain format groups by status (staged/modified/untracked) and the cap semantics from the docstring ("15 staged/modified, 10 untracked") need to apply per-bucket, not globally.
Option B (cleanup): Remove the two fields, their defaults, and the docs. If git status should not be configurable, it shouldn't expose the knob — users who set it will be confused by the silent no-op.
A third option: add a deprecation warning at config load time if the user has set these keys, and remove in a later major.
Environment
rtk 0.42.4
Confirmed against ~/rtk checkout, commit 878af7d on develop.
LimitsConfig fields status_max_files and status_max_untracked are declared and documented but never read in git.rs, silently ignoring user config; wire them up or remove them.
📁 Relevant files
src/core/config.rs
src/cmds/git/git.rs
src/core/README.md
Triaged automatically by wshm · This is an automated analysis, not a human review.
Activity
pszymkowiak commentedon Jun 14, 2026
🔍 Automated Triage
bugmediumSummary
LimitsConfig fields status_max_files and status_max_untracked are declared and documented but never read in git.rs, silently ignoring user config; wire them up or remove them.
📁 Relevant files
src/core/config.rssrc/cmds/git/git.rssrc/core/README.mdTriaged automatically by wshm · This is an automated analysis, not a human review.
fix(git): wire up status_max_files and status_max_untracked config li…
fix(git): wire up status_max_files and status_max_untracked config li…
fix(git): wire up status_max_files and status_max_untracked config li…