Re: Checking for a valid email address
- From
Miklos Vajna <vmiklos@frugalware.org>
- Date
- Feb 27, 2009, 09:08 UTC
- Message-ID
- <20090227090807.GQ4371@genesis.frugalware.org>
- In-Reply-To
- <799406d60902261928q2c691112yf24d01b92a3dad6c@mail.gmail.com>
On Thu, Feb 26, 2009 at 09:28:59PM -0600, Adam Mercer <ramercer@gmail.com> wrote:
Show 8 quoted lines
> We are in the process of migrating some of our repositories from CVS > to Git in a two step process, first to a centralised Git setup then > (hopefully) onto a more distributed development model. In the testing > we have been doing so far the only problem we have run into is > developers not setting their email addresses correctly so the > changelogs are filled with spurious address. Does anyone know of a > pre-commit hook that could check for a valid email address prior to > allowing a commit? Or another way that this can be acheived?
You can use a script like this:
http://www.perl.com/CPAN/authors/Tom_Christiansen/scripts/ckaddr.gz
Other helpful git commands to get the current email address:
git var GIT_AUTHOR_IDENT git config user.name git config user.email
You can do the rest, hopefully. :)