-
Notifications
You must be signed in to change notification settings - Fork 117
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Bug Description
File scanner/indexer (initial or subsequent) ignores all files because of (what I think is) wrong interpretation of .gitignore:
I have this in my repo's root .gitignore:
# Ignore all dot-directories in the repo root.
/.*/
... which tells git to ignore all directories with names starting with . located in the repo root. Works as it should.
But I think that grepai interprets it wrongly and then this happens:
[smuuf@smuuf-hp]$ grepai watch
Starting grepai watch in /my/lovely/project
Provider: ollama (nomic-embed-text)
Backend: gob
RPG: disabled
2026/02/20 16:04:08 Watching project: /my/lovely/project (backend: gob)
Performing initial scan...
Initial scan complete: 0 files indexed, 0 chunks created, 0 files removed, 0 skipped (took 0s)
Building symbol index...
Symbol index built: 0 symbols extracted
When I comment it out:
# Ignore all dot-directories in the repo root.
# /.*/
... then grepai properly starts to index files in my repo:
[smuuf@smuuf-hp]$ grepai watch
Starting grepai watch in /my/lovely/project
Provider: ollama (nomic-embed-text)
Backend: gob
RPG: disabled
2026/02/20 16:12:56 Watching project: /my/lovely/project(backend: gob)
Performing initial scan...
Indexing [███████████████░░░░░] 76% (2269/2993) ...vents/blablabla.php
Steps to Reproduce
- Have a project with some files.
- Put
.gitignorewith line/.*/in the project's root. - Run
grepai init; grepai watch - Nothing is scanned.
Expected Behavior
grepai shouldn't interpret having /.*/ in gitignore as "ignore everything" and should scan/index the project as expected.
Actual Behavior
grepai skipped/ignored all files in the repository and scanned/indexed 0 files.
grepai Version
repai version 0.32.1
Operating System
Linux
Embedding Provider
Ollama
Relevant Logs
Configuration
Checklist
- I have searched existing issues to avoid duplicates
- I am using the latest version of grepai
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working