Skip to content

Support ! negation in .kickflipignore - #22

Merged
OliverRC merged 1 commit into
mainfrom
feat/ignore-negation
Oct 21, 2026
Merged

OliverRC merged 1 commit into
mainfrom
feat/ignore-negation

Conversation

@OliverRC

Copy link
Copy Markdown
Owner

Problem

IgnoreService passed every .kickflipignore line to FileSystemGlobbing as an include pattern. That library has no negation, so !.htaccess matched a file literally named !.htaccess. A preceding .* then silently ignored every root dotfile.

The Wootware Magento repo has .* followed by !.htaccess, so neither .htaccess nor .user.ini has ever been deployed. PR deploys list them as Ignore.

Change

  • Lines starting with ! become AddExclude patterns, re-including whatever another pattern ignored. Every other line is still an include.
  • Unlike .gitignore, order doesn't matter: a ! pattern always wins. This is documented in the README.
  • New test IsIgnored_NegatedPatternReincludesFile covers .* with !.htaccess and !.user.ini. .env and .kickflipignore stay ignored.

dotnet test: 66 passed.

Rollout note

Consumers install kickflip unpinned (dotnet tool install kickflip), so the next published release takes effect on their next deploy. Deploys are diff-based, so a re-included file only uploads when a commit changes it. In the Magento repo, the next PR that touches .htaccess will overwrite the live copy, which has been hand-edited until now.

🤖 Generated with Claude Code

Every line was passed to FileSystemGlobbing as an include, so "!.htaccess"
matched a literal file named "!.htaccess" and a preceding ".*" silently
ignored all root dotfiles (.htaccess, .user.ini). Lines starting with "!"
now become excludes, re-including whatever another pattern ignored.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@OliverRC
OliverRC merged commit 9698bec into main Oct 21, 2026
1 check 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.

1 participant