From ed5a44a1552c407719ac8c94603b51a7e72084f0 Mon Sep 17 00:00:00 2001
From: Tristan Partin <tristan@neon.tech>
Date: Mon, 11 Dec 2023 17:34:17 -0600
Subject: [PATCH v3 1/3] Rename --silent-diff to --check in pgindent

--check should be a little bit more self-explanatory for people coming
from other similar formatter/linting tooling.
---
 src/tools/pgindent/pgindent | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/tools/pgindent/pgindent b/src/tools/pgindent/pgindent
index bce63d95da..ca5f8543a6 100755
--- a/src/tools/pgindent/pgindent
+++ b/src/tools/pgindent/pgindent
@@ -23,7 +23,7 @@ my $devnull = File::Spec->devnull;
 
 my ($typedefs_file, $typedef_str, @excludes,
 	$indent, $build, $show_diff,
-	$silent_diff, $help, @commits,);
+	$check, $help, @commits,);
 
 $help = 0;
 
@@ -35,13 +35,13 @@ my %options = (
 	"excludes=s" => \@excludes,
 	"indent=s" => \$indent,
 	"show-diff" => \$show_diff,
-	"silent-diff" => \$silent_diff,);
+	"check" => \$check,);
 GetOptions(%options) || usage("bad command line argument");
 
 usage() if $help;
 
-usage("Cannot have both --silent-diff and --show-diff")
-  if $silent_diff && $show_diff;
+usage("Cannot have both --check and --show-diff")
+  if $check && $show_diff;
 
 usage("Cannot use --commit with command line file list")
   if (@commits && @ARGV);
@@ -324,7 +324,7 @@ Options:
 	--excludes=PATH         file containing list of filename patterns to ignore
 	--indent=PATH           path to pg_bsd_indent program
 	--show-diff             show the changes that would be made
-	--silent-diff           exit with status 2 if any changes would be made
+	--check                 exit with status 2 if any changes would be made
 The --excludes and --commit options can be given more than once.
 EOF
 	if ($help)
@@ -417,7 +417,7 @@ foreach my $source_filename (@files)
 
 	if ($source ne $orig_source)
 	{
-		if ($silent_diff)
+		if ($check)
 		{
 			exit 2;
 		}
-- 
Tristan Partin
Neon (https://neon.tech)

