Monday, February 01, 2010

Git@Eclipse: let the pain begin

Every Git working directory is a full-fledged repository with complete history and full revision tracking capabilities, not dependent on network access or a central server.

-- Wikipedia

Did you know that agafgfafa @ yahoo dot com is also yours truly?  Neither does

When you set up your workstation, the identity you give yourself is only as valid as you make it. Since anyone can commit to a git repository, including you@localhost, Denis@home and agafgfafa @ yahoo dot com, the commit log of any given repository is only valid if you can recognize the identity of the committers.

The problem arises when you push your commits to a 'central' git repository, such as what I'm setting up at Eclipse.  Since git doesn't natively keep track of a push, the git commit log comes in to Eclipse servers unchallenged.

I'm sure you, nor the Eclipse IP team, would appreciate a commit log that looks like this:
commit 89aac775141bda1387429928d3601290f9959bf5
Author: Denis <denis@localhost>
AuthorDate: Mon Feb 1 13:58:30 2010 -0500
Commit: Denis <denis@localhost>
CommitDate: Mon Feb 1 13:58:30 2010 -0500

commit 3de863bdd0e5f579ff47438ed725184a6869f58e
Author: Billy Bob <>
AuthorDate: Wed Jan 27 15:51:10 2010 -0500
Commit: Big Daddy Denis <>
CommitDate: Wed Jan 27 15:51:10 2010 -0500

commit 3027d0d773461d8cf2c96c4f13d754203629f00d
Author: Denis <theman@homebox>
AuthorDate: Wed Jan 27 15:31:51 2010 -0500
Commit: Denis Roy <>

I've hacked an update hook (based on Shawn's clues) that will examine an incoming push and fail if it does not recognize all the committers, but it bears stating: committers will need to set this right before committing their code locally. Otherwise, the push will fail.

In the end, I'm sure it will all work out.  It will just take a bit of getting used to.


Anonymous Denis Roy said...

Alex, I wasn't trying to attack git. I understand the design and the limitations.

But let's face it -- most git newcomers will not git-config, or they may forget. The "pain" I am referring to is the one we'll both feel (webmasters and committers alike) when the push will fail because it contains commits from committers that we do not recognize.

I've got an open mind, but I can foresee the numerous "git is broken" and "cannot push" bugs/emails :-)

3:21 AM  

Post a Comment

<< Home