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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 Fix trailing single asterisk matching subdirs #1650

Commits on Aug 11, 2023

  1. Add regression test for path w/ trailing wildcard

    This patch demonstrates a corner case in the path glob matcher.
    Specifically, it documents how a single trailing asterisk is supposed
    to be treated as opposed to a double asterisk.
    With [[1]], a trailing `/*` is interpreted as an equivalent of `/**`.
    The commit add a case that shows that `/*` shouldn't be greedy as
    described in the docs [[2]][[3]].
    
    See also the observations in the bug report ticket [[4]].
    
    [1]: nedbat@ec6205a
    [2]: https://coverage.rtfd.io/en/stable/source.html#file-patterns
    [3]: https://coverage.rtfd.io/en/7.2.7/migrating.html#migrating-to-coverage-py-7-x
    [4]: nedbat#1407 (comment)
    webknjaz committed Aug 11, 2023
    Configuration menu
    Copy the full SHA
    b2d780d View commit details
    Browse the repository at this point in the history
  2. 馃悰 Fix trailing single asterisk matching subdirs

    This patch aims to prevent path patterns ending with `/*` from being
    greedy and interpreted the same as `/**`. After applying it, that
    trailing asterisk only matches one file or directory but not nested
    ones.
    webknjaz committed Aug 11, 2023
    Configuration menu
    Copy the full SHA
    5e2d1e5 View commit details
    Browse the repository at this point in the history