]> git.ipfire.org Git - thirdparty/git.git/blobdiff - dir.c
Merge branch 'es/test-cmp-typocatcher'
[thirdparty/git.git] / dir.c
diff --git a/dir.c b/dir.c
index 1045cc9c6f58702aba6e9036a8bce91a431c108a..fe64be30ed651de44f2aeb6c9527416e4af3da53 100644 (file)
--- a/dir.c
+++ b/dir.c
@@ -2209,13 +2209,13 @@ static enum path_treatment treat_path(struct dir_struct *dir,
                                       baselen, excluded, pathspec);
        case DT_REG:
        case DT_LNK:
-               if (excluded)
-                       return path_excluded;
                if (pathspec &&
                    !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;
        }
 }