diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-03-02 15:07:18 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-03-02 15:07:18 -0800 |
commit | cb2f5a8e971bdc4d08dde91c8f16a7464ef94cd8 (patch) | |
tree | 8e31d0e4490723e3466d48bf9c6ce9dcb461ee12 /builtin | |
parent | Merge branch 'jk/object-filter-with-bitmap' (diff) | |
parent | check-ignore: fix documentation and implementation to match (diff) | |
download | tgif-cb2f5a8e971bdc4d08dde91c8f16a7464ef94cd8.tar.xz |
Merge branch 'en/check-ignore'
"git check-ignore" did not work when the given path is explicitly
marked as not ignored with a negative entry in the .gitignore file.
* en/check-ignore:
check-ignore: fix documentation and implementation to match
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/check-ignore.c | 3 |
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); |