Skip to content

fix(parser): accept "git" alias in negated git-status#397

Merged
dmtrKovalenko merged 1 commit intodmtrKovalenko:mainfrom
qu8n:fix/negation-git-status-alias
Apr 20, 2026
Merged

fix(parser): accept "git" alias in negated git-status#397
dmtrKovalenko merged 1 commit intodmtrKovalenko:mainfrom
qu8n:fix/negation-git-status-alias

Conversation

@qu8n
Copy link
Copy Markdown
Contributor

@qu8n qu8n commented Apr 20, 2026

PR fixes a silent no-op in the query parser: !git:modified (and !git:clean|staged|untracked, all documented in the README) match every file instead of filtering.

There's a typo in the negation path's key-alias list: "gi" instead of "git". This causes !git:modified to fall through the key match -> parsed as Not(Text("git:modified")) -> no path contains that substring -> nothing filtered.

Also adds test_negation_git_status_all_key_aliases covering all four aliases (status, st, g, git) under negation. Existing test only covered status:.

Comment thread crates/fff-query-parser/src/parser.rs
@qu8n qu8n marked this pull request as ready for review April 20, 2026 12:51
@dmtrKovalenko dmtrKovalenko merged commit 7bad9f2 into dmtrKovalenko:main Apr 20, 2026
40 checks passed
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.

2 participants