]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'en/fill-directory-exponential' into master
authorJunio C Hamano <gitster@pobox.com>
Thu, 30 Jul 2020 20:20:36 +0000 (13:20 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 30 Jul 2020 20:20:36 +0000 (13:20 -0700)
Fix to a regression introduced during 2.27 cycle.

* en/fill-directory-exponential:
  dir: check pathspecs before returning `path_excluded`

1  2 
dir.c

diff --cc dir.c
index 1045cc9c6f58702aba6e9036a8bce91a431c108a,bcd04b7cbfd33c0468f4eb5062662e812e849e2d..fe64be30ed651de44f2aeb6c9527416e4af3da53
--- 1/dir.c
--- 2/dir.c
+++ b/dir.c
@@@ -2209,13 -2117,13 +2209,13 @@@ static enum path_treatment treat_path(s
                                       baselen, excluded, pathspec);
        case DT_REG:
        case DT_LNK:
-               if (excluded)
-                       return path_excluded;
                if (pathspec &&
 -                  !do_match_pathspec(istate, pathspec, path->buf, path->len,
 -                                     0 /* prefix */, NULL /* seen */,
 -                                     0 /* flags */))
 +                  !match_pathspec(istate, pathspec, path->buf, path->len,
 +                                  0 /* prefix */, NULL /* seen */,
 +                                  0 /* is_dir */))
                        return path_none;
+               if (excluded)
+                       return path_excluded;
                return path_untracked;
        }
  }