general improvements
[gitweb.git] / builtin / check-ignore.c
index 9a0f2345146117cd1bdec9511ca16ca34878b533..5a4f92395f371438cbfc0582c77666622b9c0b3d 100644 (file)
@@ -34,14 +34,14 @@ static const struct option check_ignore_options[] = {
 
 static void output_pattern(const char *path, struct path_pattern *pattern)
 {
-       char *bang  = (pattern && pattern->flags & EXC_FLAG_NEGATIVE)  ? "!" : "";
-       char *slash = (pattern && pattern->flags & EXC_FLAG_MUSTBEDIR) ? "/" : "";
+       char *bang  = (pattern && pattern->flags & PATTERN_FLAG_NEGATIVE)  ? "!" : "";
+       char *slash = (pattern && pattern->flags & PATTERN_FLAG_MUSTBEDIR) ? "/" : "";
        if (!nul_term_line) {
                if (!verbose) {
                        write_name_quoted(path, stdout, '\n');
                } else {
                        if (pattern) {
-                               quote_c_style(pattern->el->src, NULL, stdout, 0);
+                               quote_c_style(pattern->pl->src, NULL, stdout, 0);
                                printf(":%d:%s%s%s\t",
                                       pattern->srcpos,
                                       bang, pattern->pattern, slash);
@@ -58,7 +58,7 @@ static void output_pattern(const char *path, struct path_pattern *pattern)
                } else {
                        if (pattern)
                                printf("%s%c%d%c%s%s%s%c%s%c",
-                                      pattern->el->src, '\0',
+                                      pattern->pl->src, '\0',
                                       pattern->srcpos, '\0',
                                       bang, pattern->pattern, slash, '\0',
                                       path, '\0');
@@ -106,7 +106,7 @@ static int check_ignore(struct dir_struct *dir,
                pattern = NULL;
                if (!seen[i]) {
                        int dtype = DT_UNKNOWN;
-                       pattern = last_exclude_matching(dir, &the_index,
+                       pattern = last_matching_pattern(dir, &the_index,
                                                        full_path, &dtype);
                }
                if (!quiet && (pattern || show_non_matching))