Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix symlink handling #764

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft

Commits on Jun 22, 2023

  1. Configuration menu
    Copy the full SHA
    b7f8e8b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    70638ed View commit details
    Browse the repository at this point in the history
  3. Fix ignored path detection in ignored directories

    Previously a sub-path of an ignored directory was not considered to be
    ignored, e.g. is_ignored returned False for a file build/hello.py even
    if _all_ignored_files contained Path("build").  Instead of just checking
    if the path is in the ignored files we also have to check if it is
    inside of an ignored directory.
    
    Additionally this commit fixes a bug that surfaced: when building the
    _all_ignored_files set all_files contains an empty string as its last
    element. This leads to Path(".") being an element in _all_ignored_files,
    i.e. ignore everything. Using all but the last element from all_files
    fixes that.
    matrss committed Jun 22, 2023
    Configuration menu
    Copy the full SHA
    6ed46db View commit details
    Browse the repository at this point in the history
  4. Add tests for better handling of symlinks

    These tests assume the interpretation of the REUSE specification that:
    1. a symlink pointing to a covered file is considered to be the same
       file as the covered file and can therefore be ignored.
    2. a symlink pointing to a file that is not a covered file is itself
       considered to be a covered file and should not be ignored, unless the
       symlink itself is ignored by other means.
    matrss committed Jun 22, 2023
    Configuration menu
    Copy the full SHA
    2bb117c View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    fcee822 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    0552ef1 View commit details
    Browse the repository at this point in the history
  7. Fix annotating symlinks

    matrss committed Jun 22, 2023
    Configuration menu
    Copy the full SHA
    03f5b43 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    13e4fa7 View commit details
    Browse the repository at this point in the history