mirror of https://github.com/citusdata/citus.git
Fix diff-filter to search the whole line for matches
Recently two new normalization line deletion rules have been added that don't match the start of a line: ``` /local tables that are added to metadata but not chained with reference tables via foreign keys might be automatically converted back to postgres tables$/d /Consider setting citus.enable_local_reference_table_foreign_keys to 'off' to disable this behavior$/d ``` Because `diff-filter` used `regex.match` these lines were not removed when creating a new diff. This could cause some confusing diffs, where the wrong lines were shown as changed. This fixes that by using `regex.search` instead of `regex.match`.pull/4926/head
parent
3dfb766f35
commit
763fa1cf41
|
@ -41,7 +41,7 @@ def main():
|
||||||
regexpipeline.append(re.compile(rule.group('rule')))
|
regexpipeline.append(re.compile(rule.group('rule')))
|
||||||
|
|
||||||
def sed(line):
|
def sed(line):
|
||||||
if any(regex.match(line) for regex in regexpipeline):
|
if any(regex.search(line) for regex in regexpipeline):
|
||||||
return None
|
return None
|
||||||
return line
|
return line
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue