Skip to content

Conversation

jamestrew
Copy link
Contributor

@jamestrew jamestrew commented Aug 14, 2025

Describe your changes

Fixed critical bug where gitignore patterns like .* would match the root directory itself, causing filepath.SkipDir to abort entire file listing. The fix prevents gitignore rules from applying to the scan root directory, matching Git's actual behavior.

Also fixed typos in debug log messages (ingoring -> ignoring).

Related issue/discussion: closes #765

Checklist before requesting a review

Fixed critical bug where gitignore patterns like .* would match the root
directory itself, causing filepath.SkipDir to abort entire file listing.
The fix prevents gitignore rules from applying to the scan root directory,
matching Git's actual behavior.

Also fixed typos in debug log messages (ingoring -> ignoring).
Copy link
Member

@andreynering andreynering left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested and this is working as expected now. Thank you @jamestrew!

@andreynering andreynering requested a review from a team as a code owner August 14, 2025 18:21
@andreynering andreynering enabled auto-merge (squash) August 14, 2025 18:23
@andreynering andreynering merged commit 0354fef into charmbracelet:main Aug 14, 2025
10 checks passed
@andreynering
Copy link
Member

I had to push a simple fix for tests not passing on Windows.

scalabl3 pushed a commit to metaphori-ai/crush that referenced this pull request Aug 19, 2025
…harmbracelet#766)

Fixed critical bug where gitignore patterns like `.*` would match the root
directory itself, causing `filepath.SkipDir` to abort entire file listing.
The fix prevents gitignore rules from applying to the scan root directory,
matching Git's actual behavior.
@jamestrew jamestrew deleted the ignore-hidden-star branch August 20, 2025 01:53
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.

File completion returns zero results in repositories with ".*" gitignore pattern
3 participants