Skip to content

[Bug]: No file is indexed when the gitignore file contains a certain pattern #202

@pingtimeout

Description

@pingtimeout

Bug Description

When the .gitignore file contains certain patterns like .*/, the root repository is marked as ignored. As a result, the indexer finds zero file to index.

Steps to Reproduce

Create a repository with a .gitignore file containing .*/ and add files to that repository. Run grepai watch and notice that no file is indexed.

Expected Behavior

The .*/ pattern in .gitignore is there only to prevent committing local-only folders, unless -f is specified. It should only match the subdirectories of the Git repository root, and not the repository root itself.

Actual Behavior

The indexer does not find any file to index.

grepai Version

grepai version 0.35.0

Operating System

macOS

Embedding Provider

Not applicable

Relevant Logs

Configuration

Checklist

  • I have searched existing issues to avoid duplicates
  • I am using the latest version of grepai

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions