A: 

It would definitely be possible to do this with git by parsing the output of git-log, which by default shows you commits with their hash, author, date, and commit message. It looks like this:

commit faa1f8bd1aacf30579512641c34908a7bf94978e
Author: Developer <[email protected]>
Date:   Thu Oct 8 15:25:12 2009 -0500

    short commit message

    bugfixes   

commit bdf49034c2a113abcb39cfb5398289beb3a7c393
Author: Developer <[email protected]>
Date:   Thu Oct 8 10:01:08 2009 -0500

    awesome commit message

    Here's an itemized list of changes:
      - fix spelling mistakes in error output
      - code can now solve NP-complete problems
Jefromi
It would similarly be possible to parse the output of "log" in almost every version-control system.
ShreevatsaR
I figured as much - just can't speak for them. I suppose the point is yes, you should be able to do this, and no, I doubt it'll be completely built-in.
Jefromi
+2  A: 

In SVN you can prevent short commit messages from occurring in the first place with a pre-commit hook that rejects commits with messages shorter than a specific length. Alternatively, as SilentGhost pointed out in the comments below, you could have the pre-commit hook allow the check-ins but send a notification.

Asaph
I don't want to prevent them necessarily as I like the fact that they commit often, but would rather be able to speak to individuals that are not helping out the rest of the team.
KushalP
@Scorchin: so you could write the pre-commit hook that will notify you when someone commits an empty-log changeset.
SilentGhost
+2  A: 

Something like this? Replace HEAD with any revision range and 80 with whatever your mininum commit message characters should be.

git rev-list HEAD |
    xargs -iX sh -c\
        "if test \"\$(git show --quiet --pretty=format:%s%n%n%b X | wc -c)\" -lt 80; then echo X; fi"
Charles Bailey
+1  A: 

With Subversion you can use the bugtraq-regex and bugtraq-warnifnoissue properties to warn the user if the commit message does not pass the regex. This is intended to encourage users to add a bug tracking system id to their commits, but I don't see why you couldn't use it to require a minimum number of characters.

Jamie Ide
+6  A: 

You can certainly do this with Mercurial.

To prevent such commits with short messages in the first place, you can use a hook. The first example hook in the hg book does exactly that.

To find already-committed changesets with a short summary you could do:

hg log --template '{rev}:{node|short}\t{author|person}\t{desc|firstline}\n' | awk -F'\t' 'length($3) < 15'

Replace 15 with your value of "lazy".

I'm not sure off the top of my head how you'd do it if you wanted to allow short summaries if the rest of the message is long... maybe someone else can chime in.

Steve Losh