Обсуждение: pgsql: PG_MAJORVERSION: For simplicity, use PG_MAJORVERSION rather than

Поиск
Список
Период
Сортировка

pgsql: PG_MAJORVERSION: For simplicity, use PG_MAJORVERSION rather than

От
momjian@postgresql.org (Bruce Momjian)
Дата:
Log Message:
-----------
PG_MAJORVERSION:

For simplicity, use PG_MAJORVERSION rather than PG_VERSION for creation
of the PG_VERSION file.

Modified Files:
--------------
    pgsql/src/backend/commands:
        tablespace.c (r1.67 -> r1.68)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/tablespace.c?r1=1.67&r2=1.68)
    pgsql/src/bin/initdb:
        initdb.c (r1.181 -> r1.182)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/bin/initdb/initdb.c?r1=1.181&r2=1.182)

Re: pgsql: PG_MAJORVERSION: For simplicity, use PG_MAJORVERSION rather than

От
Alvaro Herrera
Дата:
Bruce Momjian wrote:
> Log Message:
> -----------
> PG_MAJORVERSION:
>
> For simplicity, use PG_MAJORVERSION rather than PG_VERSION for creation
> of the PG_VERSION file.

I think this is a bad style to use for commit messages.  For GIT, a good
commit message is a first line being a summary, and a more extensive
message below.  The way you used a contentless first line means that
somebody perusing a "git shortlog" or "git annotate" does not get any
useful information out of it.  It would have been better phrased
like

"Use PG_MAJORVERSION define to create the PG_VERSION file

It is easier than using the PG_VERSION define."

or similar.

It is also bad for pgsql-committers list archives, because those get an
extract of the first line too.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

Re: pgsql: PG_MAJORVERSION: For simplicity, use PG_MAJORVERSION rather than

От
Bruce Momjian
Дата:
Alvaro Herrera wrote:
> Bruce Momjian wrote:
> > Log Message:
> > -----------
> > PG_MAJORVERSION:
> >
> > For simplicity, use PG_MAJORVERSION rather than PG_VERSION for creation
> > of the PG_VERSION file.
>
> I think this is a bad style to use for commit messages.  For GIT, a good
> commit message is a first line being a summary, and a more extensive
> message below.  The way you used a contentless first line means that
> somebody perusing a "git shortlog" or "git annotate" does not get any
> useful information out of it.  It would have been better phrased
> like
>
> "Use PG_MAJORVERSION define to create the PG_VERSION file
>
> It is easier than using the PG_VERSION define."
>
> or similar.

That is just too odd. I think I forgot about the summary idea then.

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

Re: pgsql: PG_MAJORVERSION: For simplicity, use PG_MAJORVERSION rather than

От
Alvaro Herrera
Дата:
Bruce Momjian wrote:
> Alvaro Herrera wrote:

> > I think this is a bad style to use for commit messages.  For GIT, a good
> > commit message is a first line being a summary, and a more extensive
> > message below.
>
> That is just too odd. I think I forgot about the summary idea then.

What is odd?

If I was unclear, look at this status page:

http://git.postgresql.org/gitweb?p=postgresql.git;a=shortlog

Note that for your commit it only says "PG_MAJORVERSION:".  You have to
open the patch's page to see the rest of the message.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

Re: pgsql: PG_MAJORVERSION: For simplicity, use PG_MAJORVERSION rather than

От
Bruce Momjian
Дата:
Alvaro Herrera wrote:
> Bruce Momjian wrote:
> > Alvaro Herrera wrote:
>
> > > I think this is a bad style to use for commit messages.  For GIT, a good
> > > commit message is a first line being a summary, and a more extensive
> > > message below.
> >
> > That is just too odd. I think I forgot about the summary idea then.
>
> What is odd?
>
> If I was unclear, look at this status page:
>
> http://git.postgresql.org/gitweb?p=postgresql.git;a=shortlog
>
> Note that for your commit it only says "PG_MAJORVERSION:".  You have to
> open the patch's page to see the rest of the message.

Well, having the description and then a blank line in the middle just is
too odd for too small a group of viewers.  I might as well just type the
commit message as normal and users can see all they can.

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

Re: pgsql: PG_MAJORVERSION: For simplicity, use PG_MAJORVERSION rather than

От
Robert Haas
Дата:
On Wed, Jan 6, 2010 at 10:41 PM, Bruce Momjian <bruce@momjian.us> wrote:
> Alvaro Herrera wrote:
>> Bruce Momjian wrote:
>> > Alvaro Herrera wrote:
>>
>> > > I think this is a bad style to use for commit messages.  For GIT, a good
>> > > commit message is a first line being a summary, and a more extensive
>> > > message below.
>> >
>> > That is just too odd. I think I forgot about the summary idea then.
>>
>> What is odd?
>>
>> If I was unclear, look at this status page:
>>
>> http://git.postgresql.org/gitweb?p=postgresql.git;a=shortlog
>>
>> Note that for your commit it only says "PG_MAJORVERSION:".  You have to
>> open the patch's page to see the rest of the message.
>
> Well, having the description and then a blank line in the middle just is
> too odd for too small a group of viewers.  I might as well just type the
> commit message as normal and users can see all they can.

It's not really that odd.  You just write the message so that the
first line gives an overview of what has been done.  If you have
additional details, then you skip a line and then write them out.  For
example, in this case you might have written:

Simplify creation of the PG_VERSION file.

It makes more sense to use PG_MAJORVERSION rather than PG_VERSION for
this purpose.

This has exactly the same content as what you actually wrote, just
reworded so that the first line is a reasonable summary of the whole
message.  It's not too hard once you get the knack of it.

...Robert

Re: pgsql: PG_MAJORVERSION: For simplicity, use PG_MAJORVERSION rather than

От
Alvaro Herrera
Дата:
Bruce Momjian wrote:

> Well, having the description and then a blank line in the middle just is
> too odd for too small a group of viewers.  I might as well just type the
> commit message as normal and users can see all they can.

Think of the first line as a title.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

Re: pgsql: PG_MAJORVERSION: For simplicity, use PG_MAJORVERSION rather than

От
Magnus Hagander
Дата:
On Thu, Jan 7, 2010 at 04:41, Bruce Momjian <bruce@momjian.us> wrote:
> Alvaro Herrera wrote:
>> Bruce Momjian wrote:
>> > Alvaro Herrera wrote:
>>
>> > > I think this is a bad style to use for commit messages.  For GIT, a good
>> > > commit message is a first line being a summary, and a more extensive
>> > > message below.
>> >
>> > That is just too odd. I think I forgot about the summary idea then.
>>
>> What is odd?
>>
>> If I was unclear, look at this status page:
>>
>> http://git.postgresql.org/gitweb?p=postgresql.git;a=shortlog
>>
>> Note that for your commit it only says "PG_MAJORVERSION:".  You have to
>> open the patch's page to see the rest of the message.
>
> Well, having the description and then a blank line in the middle just is
> too odd for too small a group of viewers.  I might as well just type the
> commit message as normal and users can see all they can.

"small group"? I think you are definitely underestimating the number
of people who use the git interface to view the logs these days.

And frankly, if you're not using it yourself, you should seriously
look at it. It's vastly superior to the cvsweb interface. (And as I've
already shown you, if you're doing it locally on the commandline, then
it's *very* much nicer and faster than cvs there as well)

--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

Re: pgsql: PG_MAJORVERSION: For simplicity, use PG_MAJORVERSION rather than

От
Bruce Momjian
Дата:
Magnus Hagander wrote:
> On Thu, Jan 7, 2010 at 04:41, Bruce Momjian <bruce@momjian.us> wrote:
> > Alvaro Herrera wrote:
> >> Bruce Momjian wrote:
> >> > Alvaro Herrera wrote:
> >>
> >> > > I think this is a bad style to use for commit messages. ?For GIT, a good
> >> > > commit message is a first line being a summary, and a more extensive
> >> > > message below.
> >> >
> >> > That is just too odd. I think I forgot about the summary idea then.
> >>
> >> What is odd?
> >>
> >> If I was unclear, look at this status page:
> >>
> >> http://git.postgresql.org/gitweb?p=postgresql.git;a=shortlog
> >>
> >> Note that for your commit it only says "PG_MAJORVERSION:". ?You have to
> >> open the patch's page to see the rest of the message.
> >
> > Well, having the description and then a blank line in the middle just is
> > too odd for too small a group of viewers. ?I might as well just type the
> > commit message as normal and users can see all they can.
>
> "small group"? I think you are definitely underestimating the number
> of people who use the git interface to view the logs these days.
>
> And frankly, if you're not using it yourself, you should seriously
> look at it. It's vastly superior to the cvsweb interface. (And as I've
> already shown you, if you're doing it locally on the commandline, then
> it's *very* much nicer and faster than cvs there as well)

What I was doing was to use a several word title even for short commit
messages, but I now hear you initially don't see more than the first
line so for short messages I will just forget about the title.

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

Re: pgsql: PG_MAJORVERSION: For simplicity, use PG_MAJORVERSION rather than

От
Alvaro Herrera
Дата:
Magnus Hagander wrote:

> And frankly, if you're not using it yourself, you should seriously
> look at it. It's vastly superior to the cvsweb interface. (And as I've
> already shown you, if you're doing it locally on the commandline, then
> it's *very* much nicer and faster than cvs there as well)

Yeah.  All that cvs2cl junk can be replaced with this, which is like 100
times nicer:
http://git.postgresql.org/gitweb?p=postgresql.git;a=log
(you can have it on the command line too of course)

--
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support