Skip to content

(Bug) -i (include) Option Does Not Recursively Include Nested Directories #267

@hey-sameer

Description

@hey-sameer

Description:

When using the -i (include) option with gitingest, specifying a subdirectory (e.g., utils/dme/) only includes files directly within that directory, but does not include files within its nested subdirectories. This behavior is unexpected and limits the usefulness of the include filter, especially for repositories with deeper directory structures.

Example Directory Structure:

testrepo/
├── src/
│   ├── modules/
│   ├── nav/
│   │   ├── nav.txt
│   │   └── nav_grpah.txt
│   └── screen/
│       ├── screen1.txt
│       ├── screen2.txt
│       └── screen3.txt
└── utils/
    ├── di/
    ├── dme/
    │   ├── dme1.txt
    │   └── dme2
    └── parser/

Observed Behavior:

Running gitingest /path/to/testrepo/ -i "utils/dme/" does not include files in nested subfolder dme.

Using -i "src/,utils/" works as expected for top-level directories, but specifying a subdirectory like utils/dme/ does not recursively include any files.

Steps to Reproduce:

  1. Create a repository with nested directories as shown above.

  2. Run: gitingest /path/to/testrepo/ -i "utils/dme/"

  3. Observe that only top-level files in utils/dme/ are included, and nested files are omitted.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions