From 1433ef85b04bb772f3e470a1d41a17c7c96392cd Mon Sep 17 00:00:00 2001 From: Jelte Fennema-Nio Date: Tue, 3 Mar 2026 20:56:15 +0100 Subject: [PATCH v3 4/8] pgindent: Default to indenting the current directory if no files are given Previously running pgindent without giving it any files would result in this output: src/tools/pgindent/pgindent No files to process at src/tools/pgindent/pgindent line 526. This instead indents the current directory, which is probably what the user intended. --- src/tools/pgindent/pgindent | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/tools/pgindent/pgindent b/src/tools/pgindent/pgindent index b6fbda9a298..e6bba48893c 100755 --- a/src/tools/pgindent/pgindent +++ b/src/tools/pgindent/pgindent @@ -62,6 +62,9 @@ usage() if $help; usage("Cannot use --commit with command line file list") if (@commits && @ARGV); +# default to current directory if no files/dirs given +@ARGV = ('.') unless @ARGV || @commits; + # command line option wins, then environment, then locations based on current # dir, then default location $typedefs_file ||= $ENV{PGTYPEDEFS}; -- 2.53.0