Skip to content

git: root-level license globs also match directories, vendoring unrelated folders #1428

Description

@jgeudens

Summary

The license auto-keep patterns dfetch adds to the sparse-checkout (licen[cs]e*,
copying*, copyright*) are written without a trailing /, so they match
directories as well as files. A repo with a root-level directory whose name
starts with licen/copying/copyright gets that whole directory vendored into
the destination, next to the requested src: subtree.

Use case

The top level has an unrelated licensecore folder. I want to fetch another folder from this repo.

Dfetch will automatically copy the toplevel licensecore folder in the vendored folder, because the folder name matches the license check.

Potential fix

Would it be possible to make the license check a bit more strict?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions