summaryrefslogtreecommitdiff
path: root/builtin/check-ignore.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/check-ignore.c')
-rw-r--r--builtin/check-ignore.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/builtin/check-ignore.c b/builtin/check-ignore.c
index 5a4f92395f..ea5d0ae3a6 100644
--- a/builtin/check-ignore.c
+++ b/builtin/check-ignore.c
@@ -108,6 +108,9 @@ static int check_ignore(struct dir_struct *dir,
int dtype = DT_UNKNOWN;
pattern = last_matching_pattern(dir, &the_index,
full_path, &dtype);
+ if (!verbose && pattern &&
+ pattern->flags & PATTERN_FLAG_NEGATIVE)
+ pattern = NULL;
}
if (!quiet && (pattern || show_non_matching))
output_pattern(pathspec.items[i].original, pattern);