From f7213cb57a5439d2dc636f4d261a17cc627ba2ee Mon Sep 17 00:00:00 2001 From: Joey Perrott Date: Thu, 1 Oct 2020 10:53:07 -0700 Subject: [PATCH] fix(dev-infra): correct matching logic for g3 comparison (#39084) Corrects the matching logic for g3 comparison check, previously more matches were found than were correct. PR Close #39084 --- dev-infra/caretaker/check/g3.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev-infra/caretaker/check/g3.ts b/dev-infra/caretaker/check/g3.ts index dc49b16fcb..bc7021e597 100644 --- a/dev-infra/caretaker/check/g3.ts +++ b/dev-infra/caretaker/check/g3.ts @@ -119,6 +119,6 @@ export async function printG3Comparison(git: GitClient) { /** Determine whether the file name passes both include and exclude checks. */ function checkMatchAgainstIncludeAndExclude( file: string, includes: string[], excludes: string[]) { - return multimatch(multimatch(file, includes), excludes, {flipNegate: true}).length !== 0; + return multimatch(file, includes).length >= 1 && multimatch(file, excludes).length === 0; } }