Skip to content

Pattern-based exceptions in .gitignore not working #3224

@swisspol

Description

@swisspol

Example case:

*.data
!dont_ignore/*.data

Then add a couple files in the workdir: foo.data and dont_ignore/bar.data.

git_diff_index_to_workdir() will correctly ignore foo.data but incorrectly also ignore dont_ignore/bar.data.

Note that the .gitignore file is working as expected when testing with git status --ignored.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions