Skip to content

Conversation

@hswong3i
Copy link

To follow Git's implementation, use GitIgnoreSpec.from_lines(...). The change for using this is Git allows including files from excluded directories which directly contradicts the gitignore docs.

See #800 (comment)

Fixes #800

@coveralls
Copy link

Coverage Status

coverage: 99.815%. remained the same
when pulling 2531053 on alvistack:GitIgnoreSpec
into 73b9c0b on adrienverge:master.

2 similar comments
@coveralls
Copy link

Coverage Status

coverage: 99.815%. remained the same
when pulling 2531053 on alvistack:GitIgnoreSpec
into 73b9c0b on adrienverge:master.

@coveralls
Copy link

Coverage Status

coverage: 99.815%. remained the same
when pulling 2531053 on alvistack:GitIgnoreSpec
into 73b9c0b on adrienverge:master.

@coveralls
Copy link

coveralls commented Jan 12, 2026

Coverage Status

coverage: 99.815%. remained the same
when pulling 2b6b192 on alvistack:GitIgnoreSpec
into 73b9c0b on adrienverge:master.

hswong3i added a commit to alvistack/adrienverge-yamllint that referenced this pull request Jan 12, 2026
    git clean -xdf
    tar zcvf ../python-yamllint_1.37.1.orig.tar.gz --exclude=.git .
    debuild -uc -us
    cp python-yamllint.spec ../python-yamllint_1.37.1-1.spec
    cp ../python*-yamllint*1.37.1*.{gz,xz,spec,dsc} /osc/home\:alvistack/adrienverge-yamllint-1.37.1/
    rm -rf ../python*-yamllint_1.37.1*.* ../yamllint*1.37.1*.*

See adrienverge#802

Signed-off-by: Wong Hoi Sing Edison <[email protected]>
hswong3i added a commit to alvistack/ansible-ansible-lint that referenced this pull request Jan 12, 2026
hswong3i added a commit to alvistack/adrienverge-yamllint that referenced this pull request Jan 12, 2026
    git clean -xdf
    tar zcvf ../python-yamllint_1.37.1.orig.tar.gz --exclude=.git .
    debuild -uc -us
    cp python-yamllint.spec ../python-yamllint_1.37.1-1.spec
    cp ../python*-yamllint*1.37.1*.{gz,xz,spec,dsc} /osc/home\:alvistack/adrienverge-yamllint-1.37.1/
    rm -rf ../python*-yamllint_1.37.1*.* ../yamllint*1.37.1*.*

See adrienverge#802

Signed-off-by: Wong Hoi Sing Edison <[email protected]>
@adrienverge
Copy link
Owner

Thanks @hswong3i!

I guess this new code will make yamllint crash if a user still has pathspec < 1.0.0. Could you update pyproject.toml to require pathspec ≥ 1.0.0?

Also we could take this suggestion from @cpburnz.

Last, could you change the commit title to something more easily understandable? I propose Require pathspec ≥ 1.0.0 and follow Git's gitignore implementation.

To follow Git's implementation, use GitIgnoreSpec.from_lines(...). The
change for using this is Git allows including files from excluded
directories which directly contradicts the gitignore docs.

See adrienverge#800 (comment)

Fixes adrienverge#800

Signed-off-by: Wong Hoi Sing Edison <[email protected]>
@hswong3i
Copy link
Author

@adrienverge as you wish 🫡

hswong3i added a commit to alvistack/adrienverge-yamllint that referenced this pull request Jan 13, 2026
    git clean -xdf
    tar zcvf ../python-yamllint_1.37.1.orig.tar.gz --exclude=.git .
    debuild -uc -us
    cp python-yamllint.spec ../python-yamllint_1.37.1-1.spec
    cp ../python*-yamllint*1.37.1*.{gz,xz,spec,dsc} /osc/home\:alvistack/adrienverge-yamllint-1.37.1/
    rm -rf ../python*-yamllint_1.37.1*.* ../yamllint*1.37.1*.*

See adrienverge#802

Signed-off-by: Wong Hoi Sing Edison <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pathspec=1.0.0 causes deprecation warnings

3 participants