Skip to content

Commit 2bd2020

Browse files
aepplingclaude
authored andcommitted
fix(git): drop -uall from compact status so output never exceeds raw
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 rtk-ai#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 (rtk-ai#991 case): unchanged at +58%, all 17 shown, 0 overflow markers Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 6ec0796 commit 2bd2020

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/cmds/git/git.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ fn build_status_command(args: &[String], global_args: &[String]) -> Command {
7070
let mut cmd = git_cmd(global_args);
7171
cmd.arg("status");
7272
if uses_compact_status_path(args) {
73-
cmd.args(["--porcelain", "-b", "-uall"]);
73+
cmd.args(["--porcelain", "-b"]);
7474
} else {
7575
cmd.args(args);
7676
}
@@ -1899,10 +1899,10 @@ mod tests {
18991899
}
19001900

19011901
#[test]
1902-
fn test_build_status_command_default_includes_uall() {
1902+
fn test_build_status_command_default_compact() {
19031903
let cmd = build_status_command(&[], &[]);
19041904
let args: Vec<_> = cmd.get_args().collect();
1905-
assert_eq!(args, vec!["status", "--porcelain", "-b", "-uall"]);
1905+
assert_eq!(args, vec!["status", "--porcelain", "-b"]);
19061906
}
19071907

19081908
#[test]
@@ -1923,7 +1923,7 @@ mod tests {
19231923
let args = vec!["--short".to_string(), "--branch".to_string()];
19241924
let cmd = build_status_command(&args, &[]);
19251925
let cmd_args: Vec<_> = cmd.get_args().collect();
1926-
assert_eq!(cmd_args, vec!["status", "--porcelain", "-b", "-uall"]);
1926+
assert_eq!(cmd_args, vec!["status", "--porcelain", "-b"]);
19271927
}
19281928

19291929
#[test]

0 commit comments

Comments
 (0)