info-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: controlling/checking comments in commits


From: Todd Denniston
Subject: Re: controlling/checking comments in commits
Date: Mon, 29 Jan 2007 08:21:21 -0600
User-agent: Thunderbird 1.5.0.7 (X11/20060909)

Jim Hyslop wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mark D. Baushke wrote:
Sinan Kalkan <address@hidden> writes:

i'd like to ask whether it is possible:

1- to disallow empty comments in commits and/or

Yes, you could write a verifymsg script which denied a commit for which
the log message was empty. You would probably also want to disallow just
typing whitespace or '.' as long as you are at it.

Or typing 'asdfasdf' or 'qwertyiop' or '123' or 'blah' or 'changes' or
'latest' or...


Come now the first two or three could be defeated by:)

strings /usr/lib/aspell/en-only.rws > /tmp/en-only
for i in `each non space separated char string in message`
do
  if ! grep $i /tmp/en-only >>/dev/null
  then
    exit 1; #non word
  fi
done

IOW, it's not worth it.

Almost true.
It is not worth trying to use programming to make sure that:
A) each string is a word,
B) each stretch of strings is a sentence,
C) each sentence is grammatically correct,
...

As you will be fighting a war of arms against armor, with folks who know how to program as well as you do ... it never ends.

however, checking to see that the developer has done things like:
A) used the project comment template (provided by rcsinfo),
B) entered a Bug number (in the correct field of your template), and that bug is in a workable state,
C) marked that either his/her code was reviewed and possibly by who,
D) entered SOME KIND of comment,
Can be useful, as these _remind_ the developer that some things need done. The proper way to deal with developers not entering _USEFUL/MEANINGFUL_ comments is by bringing in the boss and reminding them of company/project policy. If the company policy/project does not state they need to enter useful information, well guess what, they don't need to. :]

--
Todd Denniston
Crane Division, Naval Surface Warfare Center (NSWC Crane)
Harnessing the Power of Technology for the Warfighter




reply via email to

[Prev in Thread] Current Thread [Next in Thread]