Skip to content

Files with identical names in different subdirectories are being skipped/ignored #1503

Description

@tylerdurdenpin-cmyk

Description

I encountered an issue where Repomix fails to include a file if there is another file with the same name elsewhere in the project (specifically in the config directory).
Example: Having both config/database.php and config/lunar/database.php causes the second one to be ignored. Renaming the file (e.g., to config/lunar/database_lunar.php) fixes the issue, which suggests a path/name collision during globbing/collection.

Steps to reproduce:

  1. Have a project structure with a file config/database.php.
    
  2. Have another file with the same name in a subdirectory, e.g., config/lunar/database.php.
    
  3. Configure repomix.config.json to include both or the folder containing both.
    
  4. Run npx repomix.
    
  5. The file config/lunar/database.php is missing from the output.
    

Expected behavior:
All files matching the include patterns should be included, regardless of whether there are other files with the same name in the repository.

Environment:

OS: Ubuntu 22.04

Additional context:
I tried using npx repomix --verbose, but the file was silently excluded. Renaming the file to a unique name solved the problem, confirming it's a name collision issue.

Usage Context

Repomix CLI

Repomix Version

1.13.1

Node.js Version

v20.20.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions