ReadManyFiles tool does not enforce .gitignore patterns

### What happened?

When I ask `gemini-cli` about details of files that are `.gitignore`d  it gives me them.

I've reproduced this on **Windows** and **Linux**

### Steps to reproduce
_I tested this in a checkout of the `gemini-cli` project._
1. Add a new entry to `.gitignore`: `erahm.test`, this should ignore all files named `erahm.test`
2. Add 3 files called `erahm.test` in nested directories:
3. Ask `gemini-cli` to tell me which tests in the erahm test framework failed

### Example setup
```
echo "erahm.test" >> .gitignore
echo "Test passed" >> packages/core/erahm.test
echo "Test passed" >> packages/core/src/tools/erahm.test
echo "Test failed" >> packages/core/src/utils/erahm.test
# confirm gitignore
git status
# run gemini with query
node packages/cli -i "Can you tell me which tests failed from the erahm framework? The status is in the erahm.test files."
```
### Example output
```
> Can you tell me which tests failed from the `erahm` framework? The status is in the `erahm.test` files.

✦ I can do that. First, I will search for the erahm.test files and then I will look for the failed tests.
╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ ✓  FindFiles '**/*erahm.test*'                                                                                                     │
│                                                                                                                                    │
│    Found 3 matching file(s)                                                                                                        │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
✦ Okay, I found three files. I will now read their contents to find the failed tests.
╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ ✓  ReadManyFiles Will attempt to read and concatenate files using patterns:                                                        │
│    packages/core/src/utils/erahm.test`, `packages/core/erahm.test`, `packages/core/src/tools/erahm.test                            │
│     (within target directory:                                                                                                      │
│    C:\Users\erahm\gemini-cli                                                                                                       │
│    ) . Excluding: patterns like                                                                                                    │
│    **/node_modules/**`, `**/.git/**...`. File encoding: utf-8. Separator: "--- path/to/file.ext ---".                              │
│                                                                                                                                    │
│    ### ReadManyFiles Result (Target Dir: `C:\Users\erahm\gemini-cli`)                                                              │
│                                                                                                                                    │
│    Successfully read and concatenated content from **3 file(s)**.                                                                  │
│                                                                                                                                    │
│    **Processed Files:**                                                                                                            │
│    - `packages/core/erahm.test`                                                                                                    │
│    - `packages/core/src/tools/erahm.test`                                                                                          │
│    - `packages/core/src/utils/erahm.test`                                                                                          │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
✦ The test that failed is in the following file: C:\Users\erahm\gemini-cli\packages\core\src\utils\erahm.test.
```

### What did you expect to happen?

`gemini-cli` should respect a project's `.gitignore` files, in this case I'd expect `gemini-cli` to fail to find the `erahm.test` files.

### Client information


* **CLI Version:** 0.10.0-nightly.20251007.c195a9aa
* **Git Commit:** c4bd7594
* **Session ID:** af937841-acc1-4665-9463-57ca29b56930
* **Operating System:** win32 v24.4.1
* **Sandbox Environment:** no sandbox
* **Model Version:** gemini-2.5-pro
* **Memory Usage:** 215.9 MB


### Login information

api-key

### Anything else we need to know?

#### Possible areas to look at
1. It's possible the `respectGitIgnore` preference is not being propagated properly
2. `ReadManyFiles` might be broken, I don't see tests that use `.gitignore`
3. It's possible just this pattern, `erahm.test` (a single, unrooted path) is buggy

#### Settings
Settings indicate "Respect .gitignore" is `true`.
```
> /settings

╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│                                                                                                                                    │
│ > Settings                                                                                                                         │
│                                                                                                                                    │
│ ▲                                                                                                                                  │
│   Show Line Numbers                                    false                                                                       │
│                                                                                                                                    │
│   Show Citations                                       false                                                                       │
│                                                                                                                                    │
│   Use Full Width                                       false                                                                       │
│                                                                                                                                    │
│   Disable Loading Phrases                              false                                                                       │
│                                                                                                                                    │
│   Screen Reader Mode                                   false                                                                       │
│                                                                                                                                    │
│   IDE Mode                                             false                                                                       │
│                                                                                                                                    │
│   Max Session Turns                                    -1                                                                          │
│                                                                                                                                    │
│   Skip Next Speaker Check                              true                                                                        │
│                                                                                                                                    │
│   Memory Discovery Max Dirs                            200                                                                         │
│                                                                                                                                    │
│   Load Memory From Include Directories                 false                                                                       │
│                                                                                                                                    │
│ ● Respect .gitignore                                   true                                                                        │
│                                                                                                                                    │
│ ▼                                                                                                                                  │
│                                                                                                                                    │
│                                                                                                                                    │
│   Apply To                                                                                                                         │
│ ● User Settings                                                                                                                    │
│   Workspace Settings                                                                                                               │
│   System Settings                                                                                                                  │
│                                                                                                                                    │
│ (Use Enter to select, Tab to change focus)                                                                                         │
│                                                                                                                                    │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
```

Labels: area/agent
State: closed