git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9d9a710)
Ignore blank lines in pgindent exclude files
2025年2月20日 16:36:07 +0000 (11:36 -0500)
2025年2月20日 16:36:07 +0000 (11:36 -0500)
Currently a blank line matches everything, which is almost never what
someone would want. If they really want that they can use a wildcard
regex to do it.

Author: Zsolt Parragi <zsolt.parragi@percona.com>

Discussion: https://postgr.es/m/CAN4CZFNka+2q3=-Dithr4w65RJfwPaV92T62spEzLn+T4MgcMg@mail.gmail.com


diff --git a/src/tools/pgindent/pgindent b/src/tools/pgindent/pgindent
index 7dccf4614aab767403763943a92785a5ad01af4b..54e138b598dfe525b511b47b87ff3ff36db49070 100755 (executable)
--- a/src/tools/pgindent/pgindent
+++ b/src/tools/pgindent/pgindent
@@ -182,7 +182,7 @@ sub process_exclude
while (my $line = <$eh>)
{
chomp $line;
- next if $line =~ m/^#/;
+ next if $line =~ m/^#/ || $line eq "";
my $rgx = qr!$line!;
@files = grep { $_ !~ /$rgx/ } @files if $rgx;
}
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /