Skip to content

.gitignore files don't take effect in Search if there is no .git folder  #182958

@studyingegret

Description

@studyingegret

Type: Bug

Steps to reproduce:

  1. Create the following files in a folder and open it with Code:

    something/
      something irrelevant.txt
      something/
        also something irrelevant.txt
    .gitignore
    irrelevant.md
    abc.txt
    

    Fill each file with the text Something, except for .gitignore which should be:

    /something
    *.md
  2. Open the search panel from the activity bar, and search for "Some".

Expected behavior: All files (including .gitignore) except for those with "irrelevant" in its name are displayed in the results.

Actual behavior: Every file is shown.

Does this happen when all extensions are disabled?: Yes

VS Code version: Code - Insiders 1.79.0-insider (2d416df, 2023-05-19T05:25:00.632Z)
OS version: Windows_NT x64 10.0.19042
Modes:

Metadata

Metadata

Assignees

Labels

feature-requestRequest for new features or functionalityinsiders-releasedPatch has been released in VS Code InsiderssearchSearch widget and operation issuesverification-neededVerification of issue is requestedverifiedVerification succeeded

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions