diff options
| author | Edward Thomson <ethomson@github.com> | 2021-06-15 00:22:30 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-06-15 00:22:30 +0100 |
| commit | 6d2a6f3e06a2d0468c89ed4c2efced58434a8735 (patch) | |
| tree | c7f9b745872f36cf08b8f35938abfc77115bf7da | |
| parent | b34aaf6c5f6b33062b3ccff6b80744492bd2b8f2 (diff) | |
| download | libgit2-6d2a6f3e06a2d0468c89ed4c2efced58434a8735.tar.gz | |
Apply suggestions from code review
| -rw-r--r-- | src/ignore.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ignore.c b/src/ignore.c index f796d3d5b..c9d0b014e 100644 --- a/src/ignore.c +++ b/src/ignore.c @@ -141,14 +141,14 @@ static int does_negate_rule(int *out, git_vector *rules, git_attr_fnmatch *match if (git_buf_oom(&buf)) goto out; - /* if rule isn't for full path we match without PATHNAME flag + /* + * if rule isn't for full path we match without PATHNAME flag * as lines like *.txt should match something like dir/test.txt * requiring * to also match / - */ + */ effective_flags = wildmatch_flags; - if (!(rule->flags & GIT_ATTR_FNMATCH_FULLPATH)) { + if (!(rule->flags & GIT_ATTR_FNMATCH_FULLPATH)) effective_flags &= ~WM_PATHNAME; - } /* if we found a match, we want to keep this rule */ if ((wildmatch(git_buf_cstr(&buf), path, effective_flags)) == WM_MATCH) { |
