pgsql/src/backend/access/nbtree nbtutils.c

Started by Bruce Momjian - CVSabout 25 years ago7 messagescomitters
Jump to latest
#1Bruce Momjian - CVS
momjian@hub.org

CVSROOT: /home/projects/pgsql/cvsroot
Module name: pgsql
Changes by: momjian@hub.org 01/05/17 10:59:32

Modified files:
src/backend/access/nbtree: nbtutils.c

Log message:
Small cleanup of spacing.

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Bruce Momjian - CVS (#1)
Re: pgsql/src/backend/access/nbtree nbtutils.c

Bruce Momjian - CVS <momjian@hub.org> writes:

Small cleanup of spacing.

Kinda pointless when pgindent is going to change it right back, eh?

regards, tom lane

#3Bruce Momjian
bruce@momjian.us
In reply to: Tom Lane (#2)
Re: pgsql/src/backend/access/nbtree nbtutils.c

Bruce Momjian - CVS <momjian@hub.org> writes:

Small cleanup of spacing.

Kinda pointless when pgindent is going to change it right back, eh?

There were empty lines around stuff:

{

x=1;
y=2;
}

Looked funny.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Bruce Momjian (#3)
Re: pgsql/src/backend/access/nbtree nbtutils.c

Bruce Momjian <pgman@candle.pha.pa.us> writes:

Bruce Momjian - CVS <momjian@hub.org> writes:

Small cleanup of spacing.

Kinda pointless when pgindent is going to change it right back, eh?

There were empty lines around stuff:

The change I was looking at was removal of a blank line just before a
comment block. pgindent inserts those whether you want 'em or not
(one of several things I do not like about it). The lines you removed
were in fact inserted by the last pgindent run.

regards, tom lane

#5Bruce Momjian
bruce@momjian.us
In reply to: Tom Lane (#4)
Re: pgsql/src/backend/access/nbtree nbtutils.c

Bruce Momjian <pgman@candle.pha.pa.us> writes:

Bruce Momjian - CVS <momjian@hub.org> writes:

Small cleanup of spacing.

Kinda pointless when pgindent is going to change it right back, eh?

There were empty lines around stuff:

The change I was looking at was removal of a blank line just before a
comment block. pgindent inserts those whether you want 'em or not
(one of several things I do not like about it). The lines you removed
were in fact inserted by the last pgindent run.

Wow, that stinks. Let me try a test.

Ewe, yes, I see that now. A blank line is force before all comment
blocks.

It was the -bbb indent flag:

-bbb, -nbbb If -bbb is specified, a blank line is forced before every
block comment. Default: -nbbb.

I have removed that flag from pgindent.

I guess I added =bbb that so a normal comment block had a blank line
before it. Do you normally like a blank line before comment blocks when
there is no brace on the line above?

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
#6Bruce Momjian
bruce@momjian.us
In reply to: Tom Lane (#4)
Re: pgsql/src/backend/access/nbtree nbtutils.c

Bruce Momjian <pgman@candle.pha.pa.us> writes:

Bruce Momjian - CVS <momjian@hub.org> writes:

Small cleanup of spacing.

Kinda pointless when pgindent is going to change it right back, eh?

There were empty lines around stuff:

The change I was looking at was removal of a blank line just before a
comment block. pgindent inserts those whether you want 'em or not
(one of several things I do not like about it). The lines you removed
were in fact inserted by the last pgindent run.

OK, I added code to remove those blank lines if the line above the
comment block is only a brace. How is that?

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
#7Tom Lane
tgl@sss.pgh.pa.us
In reply to: Bruce Momjian (#5)
Re: pgsql/src/backend/access/nbtree nbtutils.c

Bruce Momjian <pgman@candle.pha.pa.us> writes:

I guess I added =bbb that so a normal comment block had a blank line
before it. Do you normally like a blank line before comment blocks when
there is no brace on the line above?

My feeling is that when I want a blank line between segments of code,
I put one there myself. I don't like pgindent second-guessing human
intentions. Its current behavior destroys the visual value of blank
lines as code segment separators, because it will arbitrarily add and
remove 'em without regard to authorial intent.

regards, tom lane