Content-Length: 269227 | pFad | http://github.com/postgrespro/postgres/commit/62e1e28bf76910ffe47ddbc5c1fade41e1a65dac

42 Fix pgindent --show-diff option. · postgrespro/postgres@62e1e28 · GitHub
Skip to content

Commit 62e1e28

Browse files
committed
Fix pgindent --show-diff option.
At least on my machine, the initial coding of this didn't actually work, because interpolation of "$post_fh->filename" doesn't act as intended. I threw in some double quotes too, just in case anybody tries to run this in a path containing spaces.
1 parent 3cece34 commit 62e1e28

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/tools/pgindent/pgindent

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,12 +299,13 @@ sub show_diff
299299
my $source_filename = shift;
300300

301301
my $post_fh = new File::Temp(TEMPLATE => "pgdiffXXXXX");
302+
my $post_fh_filename = $post_fh->filename;
302303

303304
print $post_fh $indented;
304305

305306
$post_fh->close();
306307

307-
my $diff = `diff -upd $source_filename $post_fh->filename 2>&1`;
308+
my $diff = `diff -upd "$source_filename" "$post_fh_filename" 2>&1`;
308309
return $diff;
309310
}
310311

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/62e1e28bf76910ffe47ddbc5c1fade41e1a65dac

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy